Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-09-02 17:17:20 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-09-05 11:14:07 +0300
commit3b52c4056aafe8267feb45b934e02d5047bb8179 (patch)
tree713418cfb48d6609a7557a40bee8951f02d50bcf /source/blender/blenkernel/intern/cdderivedmesh.c
parent062732905ae52855d26884378de029e49bc68fec (diff)
Fix glUniform called from glBegin/glEnd blocks
Was causing some invalid operations in OpenGL. After more testing should be fine for 2.78.
Diffstat (limited to 'source/blender/blenkernel/intern/cdderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 2d06bc88aa7..f2dd2a3fcf6 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -941,8 +941,10 @@ static void cdDM_drawMappedFacesGLSL(
matnr = new_matnr;
do_draw = setMaterial(matnr + 1, &gattribs);
- if (do_draw)
+ if (do_draw) {
DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
+ DM_draw_attrib_vertex_uniforms(&attribs);
+ }
glBegin(GL_TRIANGLES);
}
@@ -1210,6 +1212,7 @@ static void cdDM_drawMappedFacesMat(
setMaterial(userData, matnr = new_matnr, &gattribs);
DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
+ DM_draw_attrib_vertex_uniforms(&attribs);
glBegin(GL_TRIANGLES);
}