I'm initializing my OpenGL context(SDL/GLEW) in the main thread. But rendering is done in a different thread(things like SDL_GL_SwapWindow
or glDrawElements
).
The thing is, that nothing happens if I call SDL_GL_SwapWindow
. I was trying to simply change the clear color after every swap, but nothing happens.
void render(){
// Rendering...
}
int main(){
// Initialization...
thread rendering(render);
}
Could this be problem?