PDA

View Full Version : Window flickering madness



Halcyon
01-21-2003, 05:51 PM
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: The source 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 http://www.opengl.org/discussion_boards/ubb/smile.gif

[This message has been edited by Halcyon (edited 01-21-2003).]

shinpaughp
01-21-2003, 07:40 PM
Well, I looked at your code and I did find your problem. You are calling SwapBuffers in both HRScene::Render and in HRWindow::WndLoopContents.

And, I'll just mention it, though I'm not positive, but there didn't appear to be a delete of the HRScene object which should probably be included in the HRWindow destructor. At least I couldn't find it.

And, not that anyone cares, but, VC.Net takes some getting used to... a complete change in the user interface from VC 6.0. http://www.opengl.org/discussion_boards/ubb/confused.gif The worst part is that I had just switched to VC 6.0 Intro not but 3 weeks ago from MetroWerks CodeWarior and I had already gotten used to that interface. http://www.opengl.org/discussion_boards/ubb/mad.gif Aaaaargh!

Anyway, good luck with the coding

shinpaughp

[This message has been edited by shinpaughp (edited 01-21-2003).]

Halcyon
01-22-2003, 07:38 AM
Hey, you were right! Yeah i didn't catch that at all and it was swapping back to the front buffer all the time! And, I was messing with the HRScene object and I just added it as a dynamically created class and I forgot to add that line at the end. Thanks!

I grew up on VC, so I can understand it easily...but .NET can be a little confusing. I still don't know how to link the libraries to it and stuff. It's kinda hard to move to a new IDE.

Thanks again!!!

- Halcyon

Defoc8
01-22-2003, 11:58 AM
lo there...
You did look at my OpenApp framework -
we are working on very similar systems. Perhaps - you could save yourself some grief
by ripping or at least looking at the code for this.
www.mindcage.4saken.co.uk (http://www.mindcage.4saken.co.uk)

Ok - goodluck http://www.opengl.org/discussion_boards/ubb/wink.gif

+ i will be updated my site this coming weekend http://www.opengl.org/discussion_boards/ubb/smile.gif

Halcyon
01-22-2003, 12:51 PM
Yup, I remember telling you about how I handled the system keys in my application!! You are right...ours are very similar, but our goals are slightly different. If I remember, you were trying to hide the Windows code from user, but I'm trying to provide a class that can saves the user from having to type out repetitive code. This stuff is hard isn't it? Like typing the code is easy, but the design of it can be so hard. Plus...bugs in a semi large project like this are hard to fix sometimes. Like, now I have NO idea why my viewport won't get resized to proper proportions. It goes through the resize procedure and into the setviewport and setperspectiveprojection procedures, but the view doesn't change...odd.

So, what do you guys think of Halcyon Rage so far? It's not totally done...this is like the first installment out of many to come. I'm adding more stuff to it in installments.

- Halcyon

Defoc8
01-22-2003, 04:11 PM
Its looking pretty useful...i did suffer
from some weird hangups with the demo...
like the my start bar was hovering in the
middle of the screen + it didnt reset by
desktop resolution when i quit..
Having said that though - its early days +
im sure you will sort all this out in l8r
releases..

Also - i dont think your demo needs all the
files you slapped in download - its kinda
big....

Anyway m8 - best of luck http://www.opengl.org/discussion_boards/ubb/smile.gif