From 9516b56eb486160ae958676a854dee35cb1d2d76 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sat, 9 Oct 2010 19:56:33 +0000 Subject: [PATCH] Avoid deprecated EnableClientState(EnableCap) in favor of EnableClientState(ArrayCap). --- Source/Examples/OpenGL/1.x/VBOStatic.cs | 4 ++-- Source/Examples/OpenGL/1.x/VBOStatic.rtf | Bin 3312 -> 3311 bytes Source/Examples/OpenGL/1.x/VertexArrays.cs | 2 +- Source/Examples/OpenGL/1.x/VertexLighting.cs | 4 ++-- .../OpenGL/2.x/GeometryShaderAdvanced.cs | 12 ++++++------ Source/Examples/OpenGL/2.x/SimpleGLSL.cs | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Source/Examples/OpenGL/1.x/VBOStatic.cs b/Source/Examples/OpenGL/1.x/VBOStatic.cs index e8959d11..58037487 100644 --- a/Source/Examples/OpenGL/1.x/VBOStatic.cs +++ b/Source/Examples/OpenGL/1.x/VBOStatic.cs @@ -153,8 +153,8 @@ namespace Examples.Tutorial // 4) Call DrawElements. (Note: the last parameter is an offset into the element buffer // and will usually be IntPtr.Zero). - GL.EnableClientState(EnableCap.ColorArray); - GL.EnableClientState(EnableCap.VertexArray); + GL.EnableClientState(ArrayCap.ColorArray); + GL.EnableClientState(ArrayCap.VertexArray); GL.BindBuffer(BufferTarget.ArrayBuffer, handle.VboID); GL.BindBuffer(BufferTarget.ElementArrayBuffer, handle.EboID); diff --git a/Source/Examples/OpenGL/1.x/VBOStatic.rtf b/Source/Examples/OpenGL/1.x/VBOStatic.rtf index 589853deede5a2c9f0bd2715405aef6a833c82d4..51c2e0f8afbd1c406192e92e6351f14769f2ef13 100644 GIT binary patch delta 18 Zcmew$`Cf8EBqyt5QBh*$=6KGD%m7E82G;-p delta 19 acmaDa`9X3+Bqy6|USd*C>gG7kiOc{_LI)oJ diff --git a/Source/Examples/OpenGL/1.x/VertexArrays.cs b/Source/Examples/OpenGL/1.x/VertexArrays.cs index 29ce3e50..0cbe18fe 100644 --- a/Source/Examples/OpenGL/1.x/VertexArrays.cs +++ b/Source/Examples/OpenGL/1.x/VertexArrays.cs @@ -66,7 +66,7 @@ namespace Examples.Tutorial GL.ClearColor(Color.CadetBlue); GL.Enable(EnableCap.DepthTest); - GL.EnableClientState(EnableCap.VertexArray); + GL.EnableClientState(ArrayCap.VertexArray); //GL.EnableClientState(GL.Enums.EnableCap.COLOR_ARRAY); GL.VertexPointer(3, VertexPointerType.Float, 0, shape.Vertices); //GL.ColorPointer(4, GL.Enums.ColorPointerType.UNSIGNED_BYTE, 0, shape.Colors); diff --git a/Source/Examples/OpenGL/1.x/VertexLighting.cs b/Source/Examples/OpenGL/1.x/VertexLighting.cs index ef26bf89..55d35047 100644 --- a/Source/Examples/OpenGL/1.x/VertexLighting.cs +++ b/Source/Examples/OpenGL/1.x/VertexLighting.cs @@ -42,8 +42,8 @@ namespace Examples.Tutorial GL.Enable(EnableCap.DepthTest); //GL.Enable(GL.Enums.EnableCap.CULL_FACE); - GL.EnableClientState(EnableCap.VertexArray); - GL.EnableClientState(EnableCap.NormalArray); + GL.EnableClientState(ArrayCap.VertexArray); + GL.EnableClientState(ArrayCap.NormalArray); GL.VertexPointer(3, VertexPointerType.Float, 0, shape.Vertices); GL.NormalPointer(NormalPointerType.Float, 0, shape.Normals); diff --git a/Source/Examples/OpenGL/2.x/GeometryShaderAdvanced.cs b/Source/Examples/OpenGL/2.x/GeometryShaderAdvanced.cs index f5a3662c..8935d340 100644 --- a/Source/Examples/OpenGL/2.x/GeometryShaderAdvanced.cs +++ b/Source/Examples/OpenGL/2.x/GeometryShaderAdvanced.cs @@ -717,9 +717,9 @@ namespace Examples.Tutorial void renderCubeVBO() { - GL.EnableClientState(EnableCap.VertexArray); - GL.EnableClientState(EnableCap.NormalArray); - GL.EnableClientState(EnableCap.TextureCoordArray); + GL.EnableClientState(ArrayCap.VertexArray); + GL.EnableClientState(ArrayCap.NormalArray); + GL.EnableClientState(ArrayCap.TextureCoordArray); //GL.ClientActiveTexture(TextureUnit.Texture0 + 0); GL.BindBuffer(BufferTarget.ArrayBuffer, vboCube); @@ -737,9 +737,9 @@ namespace Examples.Tutorial void renderSphereVBO() { - GL.EnableClientState(EnableCap.VertexArray); - GL.EnableClientState(EnableCap.NormalArray); - GL.EnableClientState(EnableCap.TextureCoordArray); + GL.EnableClientState(ArrayCap.VertexArray); + GL.EnableClientState(ArrayCap.NormalArray); + GL.EnableClientState(ArrayCap.TextureCoordArray); //GL.ClientActiveTexture(TextureUnit.Texture0 + 0); GL.BindBuffer(BufferTarget.ArrayBuffer, vboSphere); diff --git a/Source/Examples/OpenGL/2.x/SimpleGLSL.cs b/Source/Examples/OpenGL/2.x/SimpleGLSL.cs index 2044e066..8d55db3d 100644 --- a/Source/Examples/OpenGL/2.x/SimpleGLSL.cs +++ b/Source/Examples/OpenGL/2.x/SimpleGLSL.cs @@ -247,8 +247,8 @@ namespace Examples.Tutorial angle += rotation_speed * (float)e.Time; GL.Rotate(angle, 0.0f, 1.0f, 0.0f); - GL.EnableClientState(EnableCap.VertexArray); - GL.EnableClientState(EnableCap.ColorArray); + GL.EnableClientState(ArrayCap.VertexArray); + GL.EnableClientState(ArrayCap.ColorArray); GL.BindBuffer(BufferTarget.ArrayBuffer, vertex_buffer_object); GL.VertexPointer(3, VertexPointerType.Float, 0, IntPtr.Zero);