How to solve this: "cannot convert parameter 1 from 'const GLdouble' to 'const GLdouble *"?
In a calling to an OpenGL function, I had the following error:
error C2664: cannot convert parameter 1 from
'const GLdouble'
to'const GLdouble *'
Is it strange a bit !!
const GLdouble someColor = 开发者_C百科30.0;
The calling:
glColor3dv(someColor);
Any help!
glColor3dv
takes a pointer to the initial element of an array of three GLdouble
s (one each for the red, green, and blue channels). You are passing it a single GLdouble
by value.
Either you need an array of GLdouble
s or you need to use one of the other glColor
functions (like glColor3d
).
精彩评论