Hello
I've a question about the following code:
void CScreen2::Update (float timestep) const {
glClearColor (0.1, 0.2, 0.4, 1.0);
sf::RenderWindow *window = app.winctrl.GetWin (); // get a pointer to the instance of RenderWindow
window->clear (sf::Color (25, 50, 100, 255));
// glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
DrawTexture (texid, 100, 100, 1, OR_BOTTOM); // drawn in classic opengl manner
window->display();
}
Update() is a callback, called in every frame. In this function I've to draw a lot of things with OpenGL, not with SFML graphics. The texture is only a test object. The code above doesn't work, it shows the empty background, not the texture. But when I change the window->clear() call with glClear() then all seems to be ok. Same when I add the line with glClear().
Could anyone explain this effect?