Need code: Win32 fullscreen window init

Started by
2 comments, last by marijnh 21 years ago
I am looking for a piece of C, preferably C++, that initializes a win32 window and creates an openGL rendering context, and preferably also some code to properly handle things when the window get minimized. I already know the NeHe one, and it seems that that all the code i can find on the web is based on that one (or the other way around). The problem with that one is that it doesn''t always work right when using fullscreen, and i''d like to see what the problem is. Marijn
Advertisement
Explain ''not right''. Does it crash or what?
It leaves the desktop in the resolution of the fullscreen mode when you minimize, and when the dialog that asks for fullscreen mode is removed and the program is started from an explorer/folder window, it leaves a mouse pointer on the screen and unfocuses the window when the mouse is clicked (don''t ask me how or why this happens, but i really checked). These things were found in windows 98 by the way.

Marijn
I could give you my code framework. It relies on the use of a few classes to get things going.

I have to warn you however that I am no OO expert, probably not even a qualifying novice. Heh heh. Consequently the code that I have is probably full of "bad things" as far as how you''re supposed to program.

On the other hand it works, at least for me, and that rather painlessly. It handles transitions to and from fullscreen ok, but you may want to tweak how the thing handles input.

In your WinMain you simply declare a CGameApp object, and the routine for rendering is in GameApp.Cpp. OpenGL.Cpp contains the initialization code for OGL.

If you''re interested drop me a line.

heaven@knology.net

My ICQ # is 4868195.

Take care.

Florida, USA
RTS Engine in Development
http://www.knology.net/~heaven
Jesus is LORD!
Florida, USA
Current Project
Jesus is LORD!

This topic is closed to new replies.

Advertisement