Jump to content
  • Advertisement
Sign in to follow this  
ajm113

OpenGL OpenGL screen problems

This topic is 3565 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

Hi, I get this screen problem in OpenGL using XP, but if I am using Vista the game shows fine. Running Under XP How can I fix this bug for XP? Code:
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

Init OpenGL
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;


Thanks, Andrew.

Share this post


Link to post
Share on other sites
Advertisement
Well I think I mite have compiled the game using OpenGL 3.0. Because I installed the drivers on my Vista with the OpenGL 3.0 driver. So I am wondering if the XP versions aren't updated.

Share this post


Link to post
Share on other sites
Quote:
Original post by ajm113
Well I think I mite have compiled the game using OpenGL 3.0. Because I installed the drivers on my Vista with the OpenGL 3.0 driver. So I am wondering if the XP versions aren't updated.


Don't just wonder - go ahead and check your driver version in XP. You can not fix driver version by compiling your program. Your application can however check the driver version, and report to user if the detected driver is too old.

Share this post


Link to post
Share on other sites
It has nothing to do with what version GL is.
You are probably doing something unusual like not clearning the color buffer, not clearing the depth buffer, not swapping the buffer, or swapping too many times the buffer in your RenderScene() function.

Share this post


Link to post
Share on other sites
But why would it work in Vista and not XP, Swapping is Swapping and if the chain of events in Vista work they should work in XP, Linux or OSX... Unless I am missing something. :)

Share this post


Link to post
Share on other sites
It depends on the drivers sometimes. If you do something unusual, then you may find unexpected behavior.
The only way to be sure is to run some popular GL games and see if they work.
If not, then it`s time to buy a new computer.

Share this post


Link to post
Share on other sites
This game has been tested on XP computers from different users earlier who are having the problem, but I don't have XP to be sure if I fixed it or not. Should have mentioned It was already tested by a bunch of users using XP.

The Game
I was told glDisable Textures would work before rendering, but I don't know I haven't released a update yet that has it. This is the old version of it.

Right now I am trying to fix performance issues before I worry about the screen.


I don't do SwapBuffers and glFlush every frame F.Y.I.

I do it like this:

while(!bQuit)
{
Render();
if(PeekMessage(&message, NULL, 0, 0, PM_REMOVE))
{
if(WM_QUIT == message.message) {
bQuit = true;

}else{
TranslateMessage(&message);
DispatchMessage(&message);
}
}else{
Frame(); //glFlush and SwapBuffer.
}


Share this post


Link to post
Share on other sites
I am not sure why you wouldn't swap a buffer after each frame at least... But I hope you are at least calling

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); each frame.

Share this post


Link to post
Share on other sites
Yeah, like I posted I am using that. I think I mite have fixed it, not sure. But I reworked my gam'es main loop for the Frame function to get called after Render();

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!