SFML community forums
Help => Graphics => Topic started by: MrDoomMaster on January 28, 2008, 07:38:06 pm
-
Hi,
RenderWindow::Display() eventually leads to glClearColor() being called at line 234 in RenderWindow.cpp. the member RenderWindow::myBackgroundColor is:
50,50,50,255
This is a very weird issue and I'm not sure why it would be throwing this error. The values look valid to me.
-
Never hapened to me. Do you have a minimal code that show the behavior ?
-
Never hapened to me. Do you have a minimal code that show the behavior ?
First note that I edited my original post to omit the timing weirdness. The issue occurs 100% of the time.
Below is the code for my main loop. It's pretty simple. Let me know if there's anything else I can show you.
int main()
{
sf::RenderWindow gameWindow( sf::VideoMode( 800, 600 ), "rocket_test" );
gameWindow.SetBackgroundColor( sf::Color( 50, 50, 50 ) );
Game game( gameWindow.GetWidth(), gameWindow.GetHeight() );
for(;;)
{
if( ProcessEvents( gameWindow ) )
{
break;
}
game.Tick();
game.Draw();
gameWindow.Display();
}
return 0;
}
-
I figured out the issue. It's too embarrassingly obvious so I'm not going to say what it was lol.
This was not SFML's fault.
-
It's too embarrassingly obvious so I'm not going to say what it was lol.
Héhéhé :P
-
I figured out the issue. It's too embarrassingly obvious so I'm not going to say what it was lol.
No way... we want to know :lol:
-
I figured out the issue. It's too embarrassingly obvious so I'm not going to say what it was lol.
This was not SFML's fault.
Im having the same problem... can ya please tell me what is causing this, it's been bugging me for nearly a month now and it's threatening a deletion of one of my projects
-
Im having the same problem... can ya please tell me what is causing this, it's been bugging me for nearly a month now and it's threatening a deletion of one of my projects
Do you realize you just bumped a 6+ year old thread? The OP hasn't even logged in for 6 years also. You should really start a new thread and post a complete and minimal example there. ;)
-
Do you realize you just bumped a 6+ year old thread? The OP hasn't even logged in for 6 years also. You should really start a new thread and post a complete and minimal example there. ;)
Sorry, I just figured it out anyways... I just tried some really heavy debugging for 8 hours straight and finally figured it out... I forgot to divide a number by 2
-
Can you show how not dividing a number by 2 can lead to this OpenGL error in glClearColor? I'm really curious.