My code so far for the main function of the OpenGL program is basically this:
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;
}
What would be the best way to add menubars to the top of this OpenGL window, so that it can function more like a normal Windows application? What about adding other windows and panels?
OpenGL is merely a drawing API. Creating toplevel windows lies outside it’s scope. It is perfectly possible to implement a GUI toolkit with OpenGL. However I think you’re better off using a real toolkit like Qt or GTK.
So far you’re using GLUT, which is not part of OpenGL! It’s a 3rd party library meant for small and simple example programs. You’re not forced to use it.