Permalink
Browse files

Potential fix for issue 3430

EnableCap.ColorArray is part of the client state and must be enabled
with GL.EnableClientState, not GL.Enalbe. This is a potential fix for
http://www.opentk.com/node/3430 "Picking example's problem"
  • Loading branch information...
1 parent 9531682 commit b66912a8e1052effafbe2c6c8a752702e2d9db50 @thefiddler committed Nov 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/Examples/OpenGL/1.x/Picking.cs
@@ -235,7 +235,7 @@ protected override void OnUpdateFrame(FrameEventArgs e)
protected override void OnRenderFrame(FrameEventArgs e)
{
GL.Color3(Color.White);
- GL.Enable(EnableCap.ColorArray);
+ GL.EnableClientState(EnableCap.ColorArray);
#region Pass 1: Draw Object and pick Triangle
GL.ClearColor(1f, 1f, 1f, 1f); // clears to uint.MaxValue
@@ -261,7 +261,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
#endregion Pass 1: Draw Object and pick Triangle
GL.Color3(Color.White);
- GL.Disable(EnableCap.ColorArray);
+ GL.DisableClientState(EnableCap.ColorArray);
#region Pass 2: Draw Shape
if (SelectedTriangle == uint.MaxValue)

0 comments on commit b66912a

Please sign in to comment.