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"
This commit is contained in:
Stefanos A. 2013-11-09 15:13:50 +01:00
parent 95316829ec
commit b66912a8e1

View file

@ -235,7 +235,7 @@ namespace Examples.Tutorial
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 @@ namespace Examples.Tutorial
#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)