[英]Can I explicitly disable deprecated OpenGL functions in my code?
I recently started writing code that uses newer implementations of OpenGL. 我最近开始编写使用OpenGL较新实现的代码。 I did however notice, than in newer OpenGL implementations a lof of old functions are considered as deprecated.
我注意到,与在较新的OpenGL实现中相比,旧的函数被认为是不推荐的。 Is there any way to disable them if I only want to use proper functions?
如果我只想使用正确的功能,有没有办法禁用它们?
Use ARB_create_context_profile and request a forward-compatible context. 使用ARB_create_context_profile并请求向前兼容的上下文。
Forward-compatible contexts are defined only for OpenGL versions 3.0 and later.
前向兼容的上下文仅针对OpenGL 3.0及更高版本定义。 They must not support functionality marked as deprecated by that version of the API, while a non-forward-compatible context must support all functionality in that version, deprecated or not.
它们不得支持该API版本标记为已弃用的功能,而非向前兼容的上下文必须支持该版本中的所有功能,不推荐使用或不支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.