Explorar o código

Fixed OpenGL vertex attribute bindings

BearishSun %!s(int64=9) %!d(string=hai) anos
pai
achega
39c4f21114
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Source/BansheeGLRenderAPI/Source/BsGLSLParamParser.cpp

+ 2 - 1
Source/BansheeGLRenderAPI/Source/BsGLSLParamParser.cpp

@@ -40,8 +40,9 @@ namespace BansheeEngine
 			if (attribNameToElementSemantic(attributeName, semantic, index))
 			{
 				VertexElementType type = glTypeToAttributeType(attribType);
+				UINT32 slot = glGetAttribLocation(glProgram, attributeName);
 
-				elementList.push_back(VertexElement(0, i, type, semantic, index));
+				elementList.push_back(VertexElement(0, slot, type, semantic, index));
 			}
 			else
 			{