From f272c85704e9780d11cbc767b00f36417df2f1f2 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier Date: Thu, 21 Jul 2016 05:03:36 +0200 Subject: [PATCH] TINYGL: Initialise z buffer (valgrind) --- graphics/tinygl/zbuffer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/graphics/tinygl/zbuffer.cpp b/graphics/tinygl/zbuffer.cpp index 3a5949d7e40..98d0ce451f5 100644 --- a/graphics/tinygl/zbuffer.cpp +++ b/graphics/tinygl/zbuffer.cpp @@ -95,6 +95,7 @@ FrameBuffer::FrameBuffer(int width, int height, const Graphics::PixelBuffer &fra size = this->xsize * this->ysize * sizeof(unsigned int); this->_zbuf = (unsigned int *)gl_malloc(size); + memset(this->_zbuf, 0, size); if (!frame_buffer) { byte *pixelBuffer = (byte *)gl_malloc(this->ysize * this->linesize);