From e58af8ce56eb77ca90bb3b39772a6022749b0b1d Mon Sep 17 00:00:00 2001 From: Harrison Date: Mon, 17 Feb 2020 02:30:50 -0500 Subject: [PATCH] VertexAttributesHandle doc updated; Made texture coordinates non-normal. --- RecrownedGTK/Graphics/VertexAttributesHandle.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;