Archived

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

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

Recommended Posts

I'm building a library to make window creation easier. In fullscreen mode when i initialize OpenGL, the rendering surface flickers like crazy!! However, it works perfectly in windowed mode. I ran through the debugger and the code works fine when I am not using OpenGL. However when i put the code to initialize OpenGL in the application, it went crazy. I have a compiled programmed that shows you what's happening. Here is the link to the code: http://umn.edu/~kesa0007/OpenGL.zip - Halcyon All help is GREATLY appreciated. I even welcome people telling me possible causes of this glitch even without looking at the code. They have to be sincere suggestions though [edited by - HalcyonBlaze on January 21, 2003 11:19:02 PM]

Share on other sites
Hey, if you are on WinXP or Win2k, I ran into a similar problem.

It involved the windows message handler processing a message to repaint the background. I just intercepted that message and tossed it out.

Later,
Michael Bartman
http://www.darkomenstudios.com

Share on other sites
What message are you talking about? And by tossying out, do you mean do this ( I did this with the WM_PAINT procedure and it didn't help ):

    case WM_PAINT:return 0;break;

[edited by - HalcyonBlaze on January 21, 2003 11:57:20 PM]

Share on other sites
Hey,

Sorry, I was a bit vague;

Here is what I had to do, although when I bought a new video card I believe this problem went away. It was quite some time ago.

...//in the message handlercase WM_ERASEBKGND:break;...

According to MSDN, that message is recieved everytime windows thinks that the screen needs to be invalidated.

Prior to my intercepting that message, my application would flicker from the scene to the (HBRUSH) that I had set the window background to.

http://www.darkomenstudios.com/forums/index.php?s=728c3087073a835bd708f6d277ff16a7&act=Attach&type=post&id=334

If not, then it is something in your code, and we can track it from there.

Michael Bartman
[url]http://www.darkomenstudios.com[/url]

Share on other sites
Oh yea, push F1 while running that to see a list of commands.

Later,

Share on other sites
Unfortunately, that wasn't the problem. Your code worked perfectly on my computer. The wierd thing is that it was working perfecctly a while ago and all of the sudden it stopped working. I don't think I made any major changes...and it's not my computer because all other fullscreen apps work perfectly. The code i put up is huge, so i should point you to the main functions. The HRScene::Initialize() is where I think the problem is happeneing. I documented my code well, so it should be somewhat easy to work out.

[edited by - HalcyonBlaze on January 21, 2003 12:29:12 AM]

Share on other sites
I''ll take a look at it for you now.

Share on other sites
You have VC .net don''t you? Cause I couldn''t find a VC++ project for it.

I''d also like to comment that your code looks very nice and clean

If you have .net it will make it harder because I won''t be able to debug and step through what hrtest is doing.

Share on other sites
*couldn''t find a project for HRTest

Share on other sites
After going over your code over, and over, and over I can''t find a single thing wrong with it without debugging it.

I often had similar problems where it was because of a faulty pointer. When you debug, be sure to Watch the pointers and step through the program and watch what the pointers are changing to as the program runs. That is often the best way to track down errors; debug your program using breakpoints and step into functions and carefully watch things. Often times it would be something simple like a pointer was never getting set to anything aside from null. Although I can''t see why the program would work in window but not fullscreen.

The only thing that I can stress is that debugging is key

Also, what kind of game is Halcyon Rage going to be? I want to know more about it

Share on other sites
Well i have 3 minutes before i have to leave for class....so i''ll recompile everything in visual studio 6.0 pro and post it up for ya this evening or in the afternoon....ah the life of a college freshman.

Actually, Halcyon Rage isn''t really a game or an engine. I just wanted to make a library to take care of all the really annoying setup code that you have to do OVER and OVER again. As you can see it cuts down initialization code a LOT.

- Halcyon

P.S. Thanks so much for the help...i didn''t think anyone would come near that much code!!

Share on other sites
Well, I got it fixed. I was calling the SwapBuffers procedure twice without knowing it, so I ended up switching back to the front buffer which has been cleared to black when i switched buffers the first time. Anyways, it works like a charm now!!

Thank you so much for taking time to look over the code and offer me suggestions. I really appreciate it.

- Halcyon

Share on other sites
Hey,

No problem, I am always happy to help because I like it when people help me

On a side note, I don''t think I have ever been so sore in my whole life; stupid weight room. lol

I haven''t lifted in some time, and I just went in there this afternoon expecting it to be as easy as when I last lifted. lol

Later,
Michael Bartman
Dark Omen Studios
http://www.darkomenstudios.com

Share on other sites
Yeah, I know how that goes. When i was in swimming we used to have weights in the morning before school. Well after the season was over I didn''t lift for some time and when I went to lift again...wow was it hard!!! I woke up the next morning pretty darn sore.

- Halcyon