PDA

View Full Version : Urgent Help: How tough it is if I can not use glut?



wzhao53
12-01-2003, 09:04 AM
I developed a program to draw table and print some text dynamically in OpenGL.

Then the professor said I can not use glut.h, I can use only gl. glx is allowed.

I am using Visuaa C++ in Windows. How tough it is to change my code so that no glut is used?

Any sample code to start with without using glut?

Thanks!

For example, my main code is here:
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(500, 500);
glutInitWindowPosition(100, 100);
glutCreateWindow("Dynamic Programming Array");
Accept_String();
Insert();
init();
glutMouseFunc(mymouse);
glutKeyboardFunc(mykey);
glutDisplayFunc(display);
glutMainLoop();

mdog1234
12-01-2003, 09:45 AM
using windows would be better in terms of performance at least. I requires a lot mode coding but its not harder. Once you write the windowing code using windows it is usually easy to stick that in a class or something and use it over and over again. If you dont know the windows api that well then i would stick to glut.

wzhao53
12-01-2003, 10:05 AM
Thanks your reply. Is there any sample code without using glut?

Thanks!

Deiussum
12-01-2003, 10:11 AM
Check out the tutorials at http://nehe.gamedev.net

dvm
12-01-2003, 11:04 AM
If your professor said to use glx, you have to use linux-unix. glx is for the X-window system. "wgl" is what you should be looking at for windows. If in the end you need glx, try searching opengl.org for some of Mark Kilgard's examples using X11 and glx.