opengl 线的颜色的问题
代码如下:http://codepad.org/BH31jjJg如果把display函数里的glColor3f换成glColor3i的话,画出来的线就会变成黑色的,为什么...
代码如下:
http://codepad.org/BH31jjJg
如果把display函数里的glColor3f换成glColor3i的话,画出来的线就会变成黑色的,为什么呢?
还有如果加上那句printf的话,编译器提示那两个宏未定义,为什么? 展开
http://codepad.org/BH31jjJg
如果把display函数里的glColor3f换成glColor3i的话,画出来的线就会变成黑色的,为什么呢?
还有如果加上那句printf的话,编译器提示那两个宏未定义,为什么? 展开
2个回答
2012-07-16
展开全部
for glColor3i, I am not sure about the range of it, but in case you are using 0~1 for glColor3f
you will definitely need to scale it up to 0~255 or something for glColor3i
Or make be use glColor3ub() instead of glColor3i, it works fine.
Try this to get rid of the error
#include <GL/glew.h>
Good luck
you will definitely need to scale it up to 0~255 or something for glColor3i
Or make be use glColor3ub() instead of glColor3i, it works fine.
Try this to get rid of the error
#include <GL/glew.h>
Good luck
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询