From: Mikko Rasa Date: Mon, 27 Oct 2014 20:28:35 +0000 (+0200) Subject: Move eye_obj matrices back out of the uniform block X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=befd5cf28bbfe1b334d4e96138d35e05ce51b3dd;ds=sidebyside Move eye_obj matrices back out of the uniform block It turns out that updating the buffer for every draw call causes trouble for drivers, especially OpenGL ES. Projection matrix typically does not change during a frame, so it can stay. --- diff --git a/source/programbuilder.cpp b/source/programbuilder.cpp index 540518e4..832d5898 100644 --- a/source/programbuilder.cpp +++ b/source/programbuilder.cpp @@ -134,8 +134,8 @@ const ProgramBuilder::VariableDefinition ProgramBuilder::standard_variables[] = { UNIFORM, "environment", "samplerCube", 0, 0 }, { UNIFORM, "EnvMap::env_eye_matrix", "mat3", 0, 0 }, { UNIFORM, "Material::reflectivity", "float", 0, 0 }, - { UNIFORM, "Transform::eye_obj_matrix", "mat4", "gl_ModelViewMatrix", 0 }, - { UNIFORM, "Transform::eye_obj_normal_matrix", "mat3", "gl_NormalMatrix", 0 }, + { UNIFORM, "eye_obj_matrix", "mat4", "gl_ModelViewMatrix", 0 }, + { UNIFORM, "eye_obj_normal_matrix", "mat3", "gl_NormalMatrix", 0 }, { UNIFORM, "Transform::projection_matrix", "mat4", "gl_ProjectionMatrix", 0 }, { UNIFORM, "ShadowMap::shd_eye_matrix", "mat4", 0, 0 }, { UNIFORM, "Lighting::light_sources", "LightSourceParameters[MAX_LIGHTS]", "gl_LightSource[i]", 0 },