From ec699751467bc4ee6ca87395f96fe7069d6727e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Mon, 21 Sep 2015 21:01:44 +0200 Subject: [PATCH] Fixed uninitialized texture id in opengl This could cause an invalid operation error at texture binding --- TODO | 1 - src/render/opengl/OpenGLVariable.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO b/TODO index c2cbe1a..019b19c 100644 --- a/TODO +++ b/TODO @@ -5,7 +5,6 @@ Technlology Preview 2 : - Add clouds to OpenGL with 3d textures. - Fix potential holes in land rendering (OpenGL and software). - Fix polygon culling near the camera in low-res renders (automatic tessellation ?). -- Fix OpenGL water renderer sometimes not initializing correctly (value error in OpenGL). Technology Preview 3 : - Alter aerial perspective using estimation of the amount of light left after cloud layers traversal. diff --git a/src/render/opengl/OpenGLVariable.cpp b/src/render/opengl/OpenGLVariable.cpp index 55f9a3a..dcde1b5 100644 --- a/src/render/opengl/OpenGLVariable.cpp +++ b/src/render/opengl/OpenGLVariable.cpp @@ -17,6 +17,7 @@ OpenGLVariable::OpenGLVariable(const std::string &name): { type = TYPE_NONE; texture_toupload = false; + texture_id = 0; } void OpenGLVariable::apply(OpenGLShaderProgram *program, int &texture_unit)