[英]OpenTK.Graphics.OpenGL.GL obsolete?
I just started using OpenTK but it said the GL class is obsolete. 我刚开始使用OpenTK,但是它说GL类已经过时了。 The error was 'OpenTK.Graphics.GL' is obsolete: 'Use OptnTK Graphics.OpenGL or one of the specific profiles instead.'
错误是“ OpenTK.Graphics.GL”已过时:“改用OptnTK Graphics.OpenGL或特定配置文件之一。” .
。 I don't get what it's telling me to use instead.
我不明白它告诉我使用什么。 Any ideas?
有任何想法吗?
OpenTK comes with a standard ( OpenTK.dll
) and compatibility ( OpenTK.Compatibility.dll
) assembly. OpenTK带有标准(
OpenTK.dll
)和兼容性( OpenTK.Compatibility.dll
)程序集。 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. 根据发行说明 ,兼容性程序集包含从标准程序集中删除的旧API(从TAO / OpenTK的0.x版本开始)。
You are probably using the OpenTK.Graphics
namespace (and the GL
class from there) from the compatibility assembly and therefore getting this warning. 您可能正在使用兼容性程序
OpenTK.Graphics
命名空间(以及那里的GL
类),因此收到此警告。 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 ). 如果您正在开发新项目,则应删除对兼容性程序集的引用,并将使用更改为
OpenTK.Graphics.OpenGL
(或将OpenGL定位为OpenTK.Graphics.ES10
, OpenTK.Graphics.ES11
, OpenTK.Graphics.ES20
ES )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.