Avoid deprecated EnableClientState(EnableCap) in favor of EnableClientState(ArrayCap).
This commit is contained in:
parent
8f9cd3decf
commit
0f80ff8f1d
6 changed files with 13 additions and 13 deletions
|
@ -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);
|
||||
|
|
Binary file not shown.
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue