OpenGL错误码

517 阅读1分钟
错误码说明常见错误代码
0x0500-GL_INVALID_ENUMGiven when an enumeration parameter is not a legal enumeration for that function. This is given only for local problems; if the spec allows the enumeration in certain circumstances, where other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead.gl接口设置的的枚举类型异常
glPolygonMode(GL_FRONT, GL_LINEAR);
是GL_LINE,不是GL_LINEAR
0x0501
GL_INVALID_VALUE
Given when a value parameter is not a legal value for that function. This is only given for local problems; if the spec allows the value in certain circumstances, where other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead.数据不合法导致
glPointSize(0);
0x0502 GL_INVALID_OPERATIONGiven when the set of state for a command is not legal for the parameters given to that command. It is also given for commands where combinations of parameters define what the legal parameters are.