仅强制OpenGL核心配置文件 [英] Forcing OpenGL Core Profile Only
本文介绍了仅强制OpenGL核心配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否存在仅强制使用OpenGL核心配置文件的编译器标志或其他方式?使用不推荐使用的函数(例如glRotatef等)时,我想得到一个错误.
Is there a compiler flag or another way of forcing OpenGL core profile only? I want to get an error when i use deprecated functions like glRotatef and so on.
我正在使用Linux,但是,我也想知道如何在Windows中做到这一点
I am using Linux, however, i am also interested in knowing how to do this in Windows
我希望在编译时出现错误,但是运行时错误也可以.
I would prefer to get an error at compile time, but runtime error would be ok as well.
推荐答案
您可以使用gl3.h
而不是gl.h
来编译代码.
You could compile your code using gl3.h
instead of gl.h
.
http://www.opengl.org/registry/api/gl3.h
这篇关于仅强制OpenGL核心配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文