[Bf-blender-cvs] [2fb5a95] blender2.8: Gawain: delete bind_attrib_locations
Mike Erwin
noreply at git.blender.org
Thu Sep 15 16:51:39 CEST 2016
Commit: 2fb5a959e964590d88846b5bdbb845b372a1a86e
Author: Mike Erwin
Date: Thu Sep 15 12:24:06 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB2fb5a959e964590d88846b5bdbb845b372a1a86e
Gawain: delete bind_attrib_locations
This function modifies the GL program object, which reduces our ability to share a shader among meshes with different vertex formats. Recommended approach is to use get_attrib_locations.
===================================================================
M source/blender/gpu/gawain/attrib_binding.c
M source/blender/gpu/gawain/attrib_binding.h
===================================================================
diff --git a/source/blender/gpu/gawain/attrib_binding.c b/source/blender/gpu/gawain/attrib_binding.c
index 902f33a..05a5232 100644
--- a/source/blender/gpu/gawain/attrib_binding.c
+++ b/source/blender/gpu/gawain/attrib_binding.c
@@ -11,19 +11,6 @@
#include "attrib_binding.h"
-void bind_attrib_locations(const VertexFormat* format, GLuint program)
- {
-#if TRUST_NO_ONE
- assert(glIsProgram(program));
-#endif
-
- for (unsigned a_idx = 0; a_idx < format->attrib_ct; ++a_idx)
- {
- const Attrib* a = format->attribs + a_idx;
- glBindAttribLocation(program, a_idx, a->name);
- }
- }
-
void clear_AttribBinding(AttribBinding* binding)
{
binding->loc_bits = 0;
diff --git a/source/blender/gpu/gawain/attrib_binding.h b/source/blender/gpu/gawain/attrib_binding.h
index f22939c..dfd06ce 100644
--- a/source/blender/gpu/gawain/attrib_binding.h
+++ b/source/blender/gpu/gawain/attrib_binding.h
@@ -24,4 +24,3 @@ unsigned read_attrib_location(const AttribBinding*, unsigned a_idx);
void write_attrib_location(AttribBinding*, unsigned a_idx, unsigned location);
void get_attrib_locations(const VertexFormat*, AttribBinding*, GLuint program);
-void bind_attrib_locations(const VertexFormat*, GLuint program);
More information about the Bf-blender-cvs
mailing list