Fix crashes on OpenGL ES (thanks xenthral!)

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-06-08 21:10:17 -03:00
parent e03c763215
commit 30a63b6642
4 changed files with 17 additions and 4 deletions
+2 -2
View File
@@ -68,7 +68,7 @@ static GLenum createFBO(GLuint &framebuffer, TextureType texType, PixelFormat fo
if (isPixelFormatDepthStencil(format))
{
glClearDepth(1.0);
gl.clearDepth(1.0);
glClearStencil(0);
glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
@@ -128,7 +128,7 @@ static bool createRenderbuffer(int width, int height, int &samples, PixelFormat
{
if (isPixelFormatDepthStencil(pixelformat))
{
glClearDepth(1.0);
gl.clearDepth(1.0);
glClearStencil(0);
glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}