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
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.
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???
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.
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.
I suggest you read through NeHe’s tutorials, maybe he got some usefull info for you.