diff --git a/RecrownedGTK/Graphics/VertexAttributesHandle.cs b/RecrownedGTK/Graphics/VertexAttributesHandle.cs index e169ba3..61d47fd 100644 --- a/RecrownedGTK/Graphics/VertexAttributesHandle.cs +++ b/RecrownedGTK/Graphics/VertexAttributesHandle.cs @@ -23,6 +23,7 @@ namespace RecrownedGTK.Graphics { /// /// Creates a basic vertex attributes object handle that takes in vertices, texture coordinates, and a color. + /// First 3 values are normalized vertex position (x, y, z), second two are texture coordinates, and last 4 are color values. /// /// The shader program used. Default is the one created from . /// The name of the attribute for the vertex's position in the shader. Default is "aPosition". @@ -33,7 +34,7 @@ namespace RecrownedGTK.Graphics { if (shader == null) shader = Shader.CreateBasicShader(); VertexAttributesHandle vertexAttribs = new VertexAttributesHandle(); GL.VertexAttribPointer(shader.GetAttribLocation(positionAttribName), 3, VertexAttribPointerType.Float, false, 9 * sizeof(float), 0); - GL.VertexAttribPointer(shader.GetAttribLocation(textureAttribName), 2, VertexAttribPointerType.Float, false, 9 * sizeof(float), 3 * sizeof(float)); + GL.VertexAttribPointer(shader.GetAttribLocation(textureAttribName), 2, VertexAttribPointerType.Float, true, 9 * sizeof(float), 3 * sizeof(float)); GL.VertexAttribPointer(shader.GetAttribLocation(colorAttribName), 4, VertexAttribPointerType.Float, false, 9 * sizeof(float), 5 * sizeof(float)); vertexAttribs.End(); return vertexAttribs;