PDA

View Full Version : big problem ! urgent ! separate spec. color



Tresher
08-14-2002, 02:29 PM
Some minutes ago i used the first time textures on some surface. This surfaces was lit nicely by 3 specular originating from 3 lights. Now with the texture added it is not really viewable.
In the RED BOOK is mentioned, that with the function
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); one could apply specular highlights after texture mapping.
Unfortunately my compiler complains, that both constants aren`t declared.
I was shocked.I looked it up in the gl.h and the only lines i found were:
#define GL_FRONT_FACE 0x0B46
#define GL_LIGHTING 0x0B50
#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
#define GL_SHADE_MODEL 0x0B54
#define GL_COLOR_MATERIAL_FACE 0x0B55
#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
#define GL_COLOR_MATERIAL 0x0B57
#define GL_FOG 0x0B60

How can i solve this problem ?

Sincerely,
Martin.

Tresher
08-14-2002, 02:52 PM
I just have read that this feature is not implemented in the OpenGL 1.1 core.
Is there no possibilty to get it for the MSVS ?
Ok,i think i have the extension.
But how can i access it ?

Tresher
08-14-2002, 03:23 PM
I have found the following in some page of sgi:


Accepted by the <pname> parameter of LightModel*, and also by the
<pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
GetDoublev:

LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8

Accepted by the <param> parameter of LightModel* when <pname> is
LIGHT_MODEL_COLOR_CONTROL_EXT:

SINGLE_COLOR_EXT 0x81F9
SEPARATE_SPECULAR_COLOR_EXT 0x81FA

The named constants don`t work only the hex numbers.

But still i am not really happy with this extension stuff. Is there no place to download OpenGL1.2 ?

dorbie
08-15-2002, 01:26 AM
Try downloading an SDK from the manufacturer of your video card.

Deiussum
08-15-2002, 05:02 AM
You could get the glext.h file provided by SGI, and then you'll have all the constants defined. However, you will still have to use wglGetProcAddress to get any functions you need that are provided as extensions.

marcus256
08-16-2002, 02:27 AM
The 'particles.c' GLFW example program uses this extension - you'll see it's very easy to use. Go to the GLFW homepage (http://hem.passagen.se/opengl/glfw/) and download the source distribution.