Create the executable

I’ve got the Red Book…and it seems that if you want to create an executable you must make a CUI application that starts the gui windows functions…but…why OGL needs a CUI application to be linked to windows?
Why is it so?
Thanks…bruno.marovelli@fastwebnet.it
…email responses are really appreciated…–

Every windowing system has a means to track user input and create windowing resources. OpenGL does not provide any of this type of functionality because it is intended to be operating and windowing system agnostic. To draw with OpenGL you must first create a rendering context, to do this you must use the platform specific calls to create a window and then some supplemental calls that are designed to create an OpenGL context for that specific development platform. So on windows you use Win32 calls followed by WGL calls to greate a rendering context then call OpenGL. On Linux you create a window using X11 calls then make some GLX calls before calling OpenGL.

If you don’t like this system you can use a portability library like GLUT to allow you to make a single set of windowing calls that will compile for many platforms and hides some of the ugliness of Win32, X11 and the associated WGL and GLX calls.

tHANK YOU!
I did some OGL WIN32 programs,they work great!
-adapted some MFC exmples to the mere VC++ API coding,without classes.-And a few personal projects…
But…knew all the rest-except for linux programming.-and I used GLUT too…it’s usually used in the REDBOOK-.
Thank you.

However…I like all the way windows manage its resources…and its structure too…In my first post…I wanted to say…that you can create a CUI ,console user interface program…much similar old dos mode programs,or a GUI application -the windows real typeof applications-…but…since I read some time ago that it’s not possible to link the OGL library at a GUI application …but you need a CUI application I was a bit confused…becouse in all my examples it’s possible!
However…Thank you very much!