Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Render(ProjectionType projection)
- {
- // Enable the shader and prepare it
- Shader.Activate();
- Viewpoint.PrepareShader(Shader, projection);
- Shader.BindAttrib("inPosition", 0);
- Shader.BindAttrib("inNormal", 1);
- Shader.BindFragData("outColour", 0);
- // Bind the VAO and index vbo
- GL.BindVertexArray(iVAO);
- GL.BindBuffer(BufferTarget.ElementArrayBuffer, iVBOIndices);
- // Draw
- GL.DrawElements(BeginMode.Triangles, lstIndices.Count, DrawElementsType.UnsignedInt, 0);
- // Cleanup
- GL.BindVertexArray(0);
- GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0);
- Shader.Deactivate();
- }
Advertisement
Add Comment
Please, Sign In to add comment