Eduardo Bart 12 years ago
parent 7c48a98b67
commit ec8d50497b

@ -365,3 +365,16 @@ bool Graphics::canCacheBackbuffer()
return m_cacheBackbuffer;
#endif
}
bool Graphics::hasScissorBug()
{
#if OPENGL_ES==2
return false;
#elif OPENGL_ES==1
return false;
#else
if(!GLEW_VERSION_1_2)
return true;
return false;
#endif
}

@ -71,6 +71,7 @@ public:
bool canUseClampToEdge();
bool canUseBlendFuncSeparate();
bool canCacheBackbuffer();
bool hasScissorBug();
private:
Size m_viewportSize;

@ -222,6 +222,7 @@ void Painter::updateGlClipRect()
glEnable(GL_SCISSOR_TEST);
glScissor(m_clipRect.left(), m_resolution.height() - m_clipRect.bottom() - 1, m_clipRect.width(), m_clipRect.height());
} else {
glScissor(0, 0, m_resolution.width(), m_resolution.height());
glDisable(GL_SCISSOR_TEST);
}
}

@ -76,6 +76,10 @@ void PainterOGL1::drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode)
updateGlTextureState();
}
// GDI Generic driver has this bug
if(g_graphics.hasScissorBug())
updateGlClipRect();
// use vertex arrays if possible, much faster
if(g_graphics.canUseDrawArrays()) {
// update coords buffer hardware caches if enabled

Loading…
Cancel
Save