PDA

View Full Version : OpenGL + Win32API



Neo the great hacker
12-14-2001, 12:07 PM
Hi, can anybody tell me the place and order of the GlutMainLoop(); fuunction call and the message translating stuff:
while( GetMessage( &msg, NULL, 0, 0) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
I really need both APIs, but either the windows messages are ignored or the window isn't created which is very annoying http://www.opengl.org/discussion_boards/ubb/frown.gif

Please Help!!
thx

Bob
12-14-2001, 12:45 PM
You are not supposed to use the Win32 API and GLUT at the same time. If you really need both, I suggest you use Win32 API only, cause everything you can do with GLUT, you can do with the Win32 API, but not the other way around.

Neo the great hacker
12-14-2001, 11:28 PM
Well, my problem is, that I'm trying to write another RTS-Game, but when I click on an unit I can select it, but when I the try to send it somewhere else, I don't really know how to do that without GetCursorPos() from the Win32 API.
Is there any OpenGL call which does about the same or some other nice solution???

Bob
12-15-2001, 03:34 AM
OpenGL won't help you here. But what I don't get is what you want to use GLUT for. GLUT won't help you either, since it doesn't give you any more information than GetCursorPos does.

Neo the great hacker
12-16-2001, 06:39 AM
Well, my problem is, that I learned OpenGL from the OpenGL Superbible which uses glut to create windows, for quadrics and everything, but now I need to find the place where the user clicked on so that I thought that I could use the Win32API, but as that doesn't work I'm a bit confused how to do that then.

Bob
12-16-2001, 07:53 AM
I suggest you read through NeHe's (http://nehe.gamedev.net) tutorials, maybe he got some usefull info for you.

marcus256
12-16-2001, 11:03 PM
Use GLFW:
http://opengl.freehosting.net/glfw/

/Marcus