Do not use deprecated methods.

This commit is contained in:
the_fiddler 2010-10-22 15:03:06 +00:00
parent 2430f82ff7
commit 5ed98455d9
3 changed files with 10 additions and 10 deletions

View file

@ -57,8 +57,8 @@ namespace Examples.Tutorial
GL.Hint(HintTarget.PointSmoothHint, HintMode.Nicest); GL.Hint(HintTarget.PointSmoothHint, HintMode.Nicest);
// Setup VBO state // Setup VBO state
GL.EnableClientState(EnableCap.ColorArray); GL.EnableClientState(ArrayCap.ColorArray);
GL.EnableClientState(EnableCap.VertexArray); GL.EnableClientState(ArrayCap.VertexArray);
GL.GenBuffers(1, out VBOHandle); GL.GenBuffers(1, out VBOHandle);

View file

@ -730,9 +730,9 @@ namespace Examples.Tutorial
//GL.Arb.DrawArraysInstanced(BeginMode.Triangles, 0, cubeData.Length/8, 1); //GL.Arb.DrawArraysInstanced(BeginMode.Triangles, 0, cubeData.Length/8, 1);
GL.DrawArrays(BeginMode.Triangles, 0, cubeData.Length / (vboCubeStride / sizeof(float))); GL.DrawArrays(BeginMode.Triangles, 0, cubeData.Length / (vboCubeStride / sizeof(float)));
GL.DisableClientState(EnableCap.VertexArray); GL.DisableClientState(ArrayCap.VertexArray);
GL.DisableClientState(EnableCap.NormalArray); GL.DisableClientState(ArrayCap.NormalArray);
GL.DisableClientState(EnableCap.TextureCoordArray); GL.DisableClientState(ArrayCap.TextureCoordArray);
} }
void renderSphereVBO() void renderSphereVBO()
@ -753,9 +753,9 @@ namespace Examples.Tutorial
//GL.Arb.DrawArraysInstanced(BeginMode.Triangles, 0, cubeData.Length/8, 1); //GL.Arb.DrawArraysInstanced(BeginMode.Triangles, 0, cubeData.Length/8, 1);
//GL.DrawArrays(BeginMode.Triangles, 0, sphereData.Length / (vboSphereStride / sizeof(float))); //GL.DrawArrays(BeginMode.Triangles, 0, sphereData.Length / (vboSphereStride / sizeof(float)));
GL.DisableClientState(EnableCap.VertexArray); GL.DisableClientState(ArrayCap.VertexArray);
GL.DisableClientState(EnableCap.NormalArray); GL.DisableClientState(ArrayCap.NormalArray);
GL.DisableClientState(EnableCap.TextureCoordArray); GL.DisableClientState(ArrayCap.TextureCoordArray);
} }
void renderCubemap() void renderCubemap()

View file

@ -261,8 +261,8 @@ namespace Examples.Tutorial
//GL.DrawArrays(GL.Enums.BeginMode.POINTS, 0, shape.Vertices.Length); //GL.DrawArrays(GL.Enums.BeginMode.POINTS, 0, shape.Vertices.Length);
GL.DisableClientState(EnableCap.VertexArray); GL.DisableClientState(ArrayCap.VertexArray);
GL.DisableClientState(EnableCap.ColorArray); GL.DisableClientState(ArrayCap.ColorArray);
//int error = GL.GetError(); //int error = GL.GetError();