我正在通过 OpenTK 使用现代 OpenGL 开发一个项目。我想在我的项目中使用 Gwen dot net GUI 库。不幸的是,Gwen dot net 使用旧的 OpenGL 进行小部件渲染。我尝试过合并现代 OpenGL 和 Gwen dot net,但到目前为止尚未成功。在我浪费时间调试代码之前,我想知道是否可以合并旧版 OpenGL 和现代 OpenGL?
最佳答案
如果您创建兼容性配置文件上下文,它应该支持所有旧功能。来自 OpenGL 4.3 compatibility spec 、1.2.4:
Older generations of graphics hardware were not programmable using shaders, although they were configurable by setting state controlling specific details of their operation. The compatibility profile of OpenGL continues to support the legacy OpenGL commands developed for such fixed-function hardware, although they are typically implemented by writing shaders which reproduce the operation of such hardware. Fixed-function OpenGL commands and operations are described as alternative interfaces following descriptions of the corresponding shader stages.
关于opengl - 我可以在单个渲染窗口中同时使用已弃用的 OpenGL 和现代 OpenGL 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30595762/