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?
For example, my main code is here:
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow(“Dynamic Programming Array”);
There’s lots, actually. Check out NeHe’s tutorials: http://nehe.gamedev.net/
GLX is the X11 equivalent of WGL. If you use Visual C++ on Windows, then porting to GLX will be somewhat hard, because the APIs are quite different, as is event handling, window creation, etc.
If you want to develop on Windows, first make sure that you either have a plan for porting to GLX before submitting, or that they will accept Windows submissions. Else, get a copy of Linux, install XFree86, and bite the bullet, if GLX is really the requirement.
You need to go chat with your professor again and let him know that WGL is the windows platform specific glue and that GLX does not exist on windows (except in a mostly uninteresting software emulation layer in Mesa) and make sure it’s OK to use WGL.
If not and he insists you learn GLX then you’re probably on the wrong platform. You should then shoot for a Linux based solution, or maybe even cross playform development.
WGL will probably be OK, I expect your prof just wants you to understand the basics of creating your own window and graphics context and writing your own your own event handling.
You can download the GLUT source and see how it does things, that should help.
There are loads of OpenGL tutorials on creating windows and contexts on both glx and wgl.