Archived

This topic is now archived and is closed to further replies.

Need code: Win32 fullscreen window init

This topic is 5382 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites