私は、Visual Studio 2013とOpenGLを使ってシミュレーションを作成しています。 理想的には、作成しているウィンドウを開いたままにして、キーを使用して変更を加え、同じウィンドウで別の結果を表示できるようにする必要があります。 しかし、それはエラーコードで起動した直後にウィンドウがOpenGLウィンドウがすぐにエラー-1073740777(0xc0000417)で終了する
を閉じPROGRAM.EXE」のコード-1073740777(0xc0000417)
で終了しました私はいくつかのデバッグを行なったし、様々なラインにコメントしようとしたことを見ました私が 'glutSwapBuffers()'をコメントとして作成した場合、ウィンドウは開いたままですが空です。
誰かがこれにどのような光を当てることができますか?
void keyboard (unsigned char key, int x, int y)
{
switch (key)
{
case 'r': case 'R':
if (filling==0)
{
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
filling=1;
}
else
{
glPolygonMode (GL_FRONT_AND_BACK, GL_POINT);
filling=0;
}
break;
case 27:
exit(0);
break;
}
}
。
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glRotatef(-90,0.0,1.0,0.0);
glRotatef(-90,1.0,0.0,0.0);
rotation_x = rotation_x + (rotation_x_increment - rotation_x)/50;
rotation_y = rotation_y + (rotation_y_increment - rotation_y)/50;
rotation_z = rotation_z + rotation_z_increment;
if (rotation_x > 359) rotation_x = 0;
if (rotation_y > 359) rotation_y = 0;
if (rotation_z > 359) rotation_z = 0;
if(rotation_x_increment > 359) rotation_x_increment = 0;
if(rotation_y_increment > 359) rotation_y_increment = 0;
if(rotation_z_increment > 359) rotation_z_increment = 0;
glRotatef(rotation_x,1.0,0.0,0.0);
glRotatef(rotation_y,0.0,1.0,0.0);
glRotatef(rotation_z,0.0,0.0,1.0);
glTranslatef(x_translate,0.0,0.0);
glTranslatef(0.0,y_translate,0.0);
glTranslatef(0,0,z_translate);
glFlush(); // This force the execution of OpenGL commands
glutSwapBuffers();
glFinish();
}
。
int main(int argc, char **argv)
{
IntroDisplay();
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(screen_width,screen_height);
glutInitWindowPosition(0,0);
glutCreateWindow("Ultrasonic Testing");
glutDisplayFunc(display);
glutIdleFunc(display);
glutReshapeFunc (resize);
glutKeyboardFunc (keyboard);
glutSpecialFunc (keyboard_s);
glutMouseFunc(mouse);
glutMotionFunc(mouseMove);
init();
glutMainLoop();
return 0;
}
STATUS_INVALID_CRUNTIME_PARAMETER - おそらく混在しているなど、ソースからすべてを再構築します。 – paulm
@paulm再構築を試みました。クリーニングと再構築を試しました。まだ変更はありません。 Windowsやglut32.dllに関連するものでしょうか?私はしばらくコードを変更していないので、突然これをやり始めました。 –
glutを含む? – paulm