Commit: 90939f3539b41c10c1949508fd64d6f3e736cc6b
Author: Sergey Sharybin
Date:   Thu Jul 17 12:41:58 2014 +0600
https://developer.blender.org/rB90939f3539b41c10c1949508fd64d6f3e736cc6b

OpenSubdiv: Dedublicate a bit of a code

===================================================================

M       intern/opensubdiv/opensubdiv_gpu_capi.cc

===================================================================

diff --git a/intern/opensubdiv/opensubdiv_gpu_capi.cc 
b/intern/opensubdiv/opensubdiv_gpu_capi.cc
index 6a26269..5b26418 100644
--- a/intern/opensubdiv/opensubdiv_gpu_capi.cc
+++ b/intern/opensubdiv/opensubdiv_gpu_capi.cc
@@ -414,22 +414,17 @@ void openSubdiv_osdGLMeshDisplay(OpenSubdiv_GLMesh 
*gl_mesh,
                OpenSubdiv::FarPatchTables::Type patchType = desc.GetType();
 
                if (patchType == OpenSubdiv::FarPatchTables::QUADS) {
+                       int mode = GL_QUADS;
 #ifndef OPENSUBDIV_LEGACY_DRAW
                        glUniform1i(glGetUniformLocation(program, 
"PrimitiveIdBase"),
                                    patch.GetPatchIndex());
-
-                       glDrawElements(GL_LINES_ADJACENCY,
-                                      patch.GetNumIndices(),
-                                      GL_UNSIGNED_INT,
-                                      (void *)(patch.GetVertIndex() *
-                                               sizeof(unsigned int)));
-#else
-                       glDrawElements(GL_QUADS,
+                       mode = GL_LINES_ADJACENCY;
+#endif
+                       glDrawElements(mode,
                                       patch.GetNumIndices(),
                                       GL_UNSIGNED_INT,
                                       (void *)(patch.GetVertIndex() *
                                                sizeof(unsigned int)));
-#endif
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to