开发者

How to solve this: "cannot convert parameter 1 from 'const GLdouble' to 'const GLdouble *"?

开发者 https://www.devze.com 2023-02-28 16:43 出处:网络
In a calling to an OpenGL function, I had the following error: error C2664: 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 GLdoubles (one each for the red, green, and blue channels). You are passing it a single GLdouble by value.

Either you need an array of GLdoubles or you need to use one of the other glColor functions (like glColor3d).

0

精彩评论

暂无评论...
验证码 换一张
取 消