Avoid deprecated EnableClientState(EnableCap) in favor of EnableClientState(ArrayCap).

This commit is contained in:
the_fiddler 2010-10-09 19:56:33 +00:00
parent 8f9cd3decf
commit 0f80ff8f1d
6 changed files with 13 additions and 13 deletions

View file

@ -153,8 +153,8 @@ namespace Examples.Tutorial
// 4) Call DrawElements. (Note: the last parameter is an offset into the element buffer // 4) Call DrawElements. (Note: the last parameter is an offset into the element buffer
// and will usually be IntPtr.Zero). // and will usually be IntPtr.Zero).
GL.EnableClientState(EnableCap.ColorArray); GL.EnableClientState(ArrayCap.ColorArray);
GL.EnableClientState(EnableCap.VertexArray); GL.EnableClientState(ArrayCap.VertexArray);
GL.BindBuffer(BufferTarget.ArrayBuffer, handle.VboID); GL.BindBuffer(BufferTarget.ArrayBuffer, handle.VboID);
GL.BindBuffer(BufferTarget.ElementArrayBuffer, handle.EboID); GL.BindBuffer(BufferTarget.ElementArrayBuffer, handle.EboID);

View file

@ -66,7 +66,7 @@ namespace Examples.Tutorial
GL.ClearColor(Color.CadetBlue); GL.ClearColor(Color.CadetBlue);
GL.Enable(EnableCap.DepthTest); GL.Enable(EnableCap.DepthTest);
GL.EnableClientState(EnableCap.VertexArray); GL.EnableClientState(ArrayCap.VertexArray);
//GL.EnableClientState(GL.Enums.EnableCap.COLOR_ARRAY); //GL.EnableClientState(GL.Enums.EnableCap.COLOR_ARRAY);
GL.VertexPointer(3, VertexPointerType.Float, 0, shape.Vertices); GL.VertexPointer(3, VertexPointerType.Float, 0, shape.Vertices);
//GL.ColorPointer(4, GL.Enums.ColorPointerType.UNSIGNED_BYTE, 0, shape.Colors); //GL.ColorPointer(4, GL.Enums.ColorPointerType.UNSIGNED_BYTE, 0, shape.Colors);

View file

@ -42,8 +42,8 @@ namespace Examples.Tutorial
GL.Enable(EnableCap.DepthTest); GL.Enable(EnableCap.DepthTest);
//GL.Enable(GL.Enums.EnableCap.CULL_FACE); //GL.Enable(GL.Enums.EnableCap.CULL_FACE);
GL.EnableClientState(EnableCap.VertexArray); GL.EnableClientState(ArrayCap.VertexArray);
GL.EnableClientState(EnableCap.NormalArray); GL.EnableClientState(ArrayCap.NormalArray);
GL.VertexPointer(3, VertexPointerType.Float, 0, shape.Vertices); GL.VertexPointer(3, VertexPointerType.Float, 0, shape.Vertices);
GL.NormalPointer(NormalPointerType.Float, 0, shape.Normals); GL.NormalPointer(NormalPointerType.Float, 0, shape.Normals);

View file

@ -717,9 +717,9 @@ namespace Examples.Tutorial
void renderCubeVBO() void renderCubeVBO()
{ {
GL.EnableClientState(EnableCap.VertexArray); GL.EnableClientState(ArrayCap.VertexArray);
GL.EnableClientState(EnableCap.NormalArray); GL.EnableClientState(ArrayCap.NormalArray);
GL.EnableClientState(EnableCap.TextureCoordArray); GL.EnableClientState(ArrayCap.TextureCoordArray);
//GL.ClientActiveTexture(TextureUnit.Texture0 + 0); //GL.ClientActiveTexture(TextureUnit.Texture0 + 0);
GL.BindBuffer(BufferTarget.ArrayBuffer, vboCube); GL.BindBuffer(BufferTarget.ArrayBuffer, vboCube);
@ -737,9 +737,9 @@ namespace Examples.Tutorial
void renderSphereVBO() void renderSphereVBO()
{ {
GL.EnableClientState(EnableCap.VertexArray); GL.EnableClientState(ArrayCap.VertexArray);
GL.EnableClientState(EnableCap.NormalArray); GL.EnableClientState(ArrayCap.NormalArray);
GL.EnableClientState(EnableCap.TextureCoordArray); GL.EnableClientState(ArrayCap.TextureCoordArray);
//GL.ClientActiveTexture(TextureUnit.Texture0 + 0); //GL.ClientActiveTexture(TextureUnit.Texture0 + 0);
GL.BindBuffer(BufferTarget.ArrayBuffer, vboSphere); GL.BindBuffer(BufferTarget.ArrayBuffer, vboSphere);

View file

@ -247,8 +247,8 @@ namespace Examples.Tutorial
angle += rotation_speed * (float)e.Time; angle += rotation_speed * (float)e.Time;
GL.Rotate(angle, 0.0f, 1.0f, 0.0f); GL.Rotate(angle, 0.0f, 1.0f, 0.0f);
GL.EnableClientState(EnableCap.VertexArray); GL.EnableClientState(ArrayCap.VertexArray);
GL.EnableClientState(EnableCap.ColorArray); GL.EnableClientState(ArrayCap.ColorArray);
GL.BindBuffer(BufferTarget.ArrayBuffer, vertex_buffer_object); GL.BindBuffer(BufferTarget.ArrayBuffer, vertex_buffer_object);
GL.VertexPointer(3, VertexPointerType.Float, 0, IntPtr.Zero); GL.VertexPointer(3, VertexPointerType.Float, 0, IntPtr.Zero);