fix: don't use SFML GL context management in SDL builds
This commit is contained in:
parent
f4c9db8436
commit
8636e766f8
1 changed files with 4 additions and 0 deletions
|
|
@ -85,7 +85,9 @@ void Viewport3D::render(sf::Vector2f offset, sf::RenderTarget& target) {
|
|||
|
||||
// Save SFML's GL state before raw GL rendering
|
||||
// This is REQUIRED when mixing SFML 2D and raw OpenGL
|
||||
#ifndef MCRF_SDL2
|
||||
target.pushGLStates();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Render 3D content to FBO
|
||||
|
|
@ -93,7 +95,9 @@ void Viewport3D::render(sf::Vector2f offset, sf::RenderTarget& target) {
|
|||
|
||||
// Restore SFML's GL state after our GL calls
|
||||
if (gl::isGLReady()) {
|
||||
#ifndef MCRF_SDL2
|
||||
target.popGLStates();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Blit FBO to screen (using SFML's drawing, so after state restore)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue