user2348979
user2348979

Reputation: 143

OpenTK.Graphics.OpenGL.GL obsolete?

I just started using OpenTK but it said the GL class is obsolete. The error was 'OpenTK.Graphics.GL' is obsolete: 'Use OptnTK Graphics.OpenGL or one of the specific profiles instead.'. I don't get what it's telling me to use instead. Any ideas?

Upvotes: 2

Views: 3514

Answers (1)

Simon Opelt
Simon Opelt

Reputation: 6201

OpenTK comes with a standard (OpenTK.dll) and compatibility (OpenTK.Compatibility.dll) assembly. According to the release notes the compatibility assembly contains legacy-APIs (from the 0.x versions of TAO/OpenTK) which are removed from the standard assembly.

You are probably using the OpenTK.Graphics namespace (and the GL class from there) from the compatibility assembly and therefore getting this warning. If you are developing a new project you should remove the reference to the compatibility assembly and change your usings to OpenTK.Graphics.OpenGL (or OpenTK.Graphics.ES10, OpenTK.Graphics.ES11, OpenTK.Graphics.ES20 should you be targetting OpenGL ES).

Upvotes: 4

Related Questions