迄今OpenGL的程序的主要功能我的代碼基本上是這樣的:在OpenGL應用程序添加菜單欄和其他窗口
int main(int argc, char **argv)
{
glutInit(&argc, argv); // Initialize GLUT
glutInitDisplayMode(GLUT_SINGLE); // Set up a basic display buffer (only single buffered for now)
glutInitWindowSize(500, 500); // Set the width and height of the window
glutInitWindowPosition(100, 100); // Set the position of the window (on your screen)
glutCreateWindow("Statistical Mechanics Simulation"); // Set the title for the window
glutDisplayFunc(display); // Tell GLUT to use the method "display" for rendering
glutReshapeFunc(reshape); // Tell GLUT to use the method "reshape" for rendering
glutIdleFunc(simulate);
containers.push_back(Container(Coordinate(-50, -50, -50), Coordinate(100, 100, 50)));
containers[0].addParticle(Particle(1, 5, Coordinate(30, 30, 0), Coordinate(5, 3, 0)));
containers[0].addParticle(Particle(4, 2, Coordinate(-10, 20, 0), Coordinate(0, 0, 0)));
containers[0].addParticle(Particle(5, 5, Coordinate(0, 0, 0), Coordinate(50, 0, 0)));
glutMainLoop(); // Enter GLUT's main loop
return 0;
}
什麼將菜單欄添加到此OpenGL的頂部的最佳方式窗口,以便它可以更像普通Windows應用程序的功能?如何添加其他窗口和麪板?
啊哈,感謝您的澄清!我會嘗試Gtk下我想 – wrongusername 2011-12-18 16:57:11