OpenGL contra UtilityTool

Can anybody check my gerneral understanding?

If I use the Glut (and include glut.h) than I have to call the MainLoop()?

If I use pure OpenGL I can update the window with glFlush and i donot need the MainLoop()? If this is correct, how can I detect the difference in the files?

What files (dll, lib, h) need I to work with pure OpenGL

ToP

Yes if you use Glut you have to use the glutMainLoop, though there are some hacks around to get around it.

This site maybe a good place for you to start nehe.gamedev.net has examples of using windows API to open a window and use openGL.

the core files for openGL are:
header, library
gl.h, opengl32.lib, opengl32.dll - windows
gl.h, libGL.so - linux

The next utility library is GLU (GL utility library)
header, library
glu.h, glu32.lib, glu32.dll - windows
glu.h, libGLU.so - linux

If you have windows above 95 release 2, then you have the openGL dll files installed already,with the exception of the glut32.dll.

Originally posted by StudentTUD:
[b]Can anybody check my gerneral understanding?

If I use the Glut (and include glut.h) than I have to call the MainLoop()?

If I use pure OpenGL I can update the window with glFlush and i donot need the MainLoop()? If this is correct, how can I detect the difference in the files?

What files (dll, lib, h) need I to work with pure OpenGL

ToP[/b]

[This message has been edited by nexusone (edited 07-16-2003).]

You can’t create a window with “pure OpenGL.” You have to use OS specific calls for that part. Libraries like Glut, SDL, and glfw are designed to try and hide those OS specific calls from you in a way that lets you use the same functions to create the windows on different OSes.

So, if you don’t use glut to create the window, your other options are to use SDL, or glfw, or just do the OS specific calls yourself. For Windows this means the Win32 API, or some other set of wrapper classes for it like MFC, .Net forms, Borland’s form stuff, etc…

Originally posted by StudentTUD:
[b]Can anybody check my gerneral understanding?

If I use the Glut (and include glut.h) than I have to call the MainLoop()?
Yes. Otherwise you wouldn’t be using glut. Including glut.h at all would then be unnecessary.

If I use pure OpenGL I can update the window with glFlush and i donot need the MainLoop()?
glFlush does not update your view. SwapBuffers (on Windoze) does that. glFlush is just that - it flushes the commands you’ve queued up so far.

If this is correct, how can I detect the difference in the files?
???
I’ll just assume that you do know what a compiler is, what a source file is, and what a library is, and that this sentence was a mere glitch. Otherwise you shouldn’t be burdening yourself with OpenGL programming …

What files (dll, lib, h) need I to work with pure OpenGL

ToP[/b]
#include <gl/gl.h>

Link to opengl32.lib or libopengl32.a, depending on your compiler (MSVC requires the former, GCC/MingW the latter).

Additionally, you’ll need something to interface with the target OS, of course.

@nexusone

that was a great hint, that is what i was looking for. Thanks

ToP