Skip to main content
gamedev.net
🔒 Locked

float and double

Started by arczev Mar 9, 2007 at 5:45 AM 0 replies 600+ views
Original Post
arczev
arczev
Hi I'm not very practiced in OpenGL yet and I have little problem with lighting. Whenever I try to call glLightfv() function with numerical parameter like: glLightfv(GL_LIGHT0,GL_CONSTANT_ATTENUATION,4.0f);[\code] occurs following error: "Type mismatch in parameter 'params' (wanted 'const float *', got 'double')" What I'm doing wrong?
ggp83
ggp83
glLightfv, the v at the end means it wants a pointer/array. So passing a constant value doesn't make any sense to it. If you want to pass a single value, use glLightf.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.