我有一个任务...
1.-我正在使用openGL显示一个矩阵数组,每个值都是一个强度并且它完成了。2.- 我需要用新值刷新这个窗口,但是glutMainLoop()没有帮助......
代码是:
无效图形函数(无效)
{
/*Here print the array just once and I cannot do the second T_T*/
}
我需要在 u[i][j] 上使用新值来执行此代码,主要是:
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
glutInitWindowSize(500,500);
glutCreateWindow("1D Function");
glutDisplayFunc(graphfunct);
glutKeyboardFunc(exit);
glutMainLoop();
问题出在 glutMainLoop(); 这个函数在无穷大并且启动时我无法在 u[i][j] 上设置新值。