View Full Version : secondary specular and OGL vertex arrays
12-20-2001, 07:34 AM
How can it be achieved? I know, that it should use EXT_secondary_color extension, but how can I tell OpenGL that secondary color pointer means specular? In Direct3D they have it in FVF, but it's rather problematic to use in OGL.
The secondary color is just a secondary color is the color sum stage. It has nothing to do with lighting. In fact, the secondary color isn't even used when lighting is enabled. If you tell us what you're trying to do, maybe we can point you in the right direction.
Rob The Bloke
12-21-2001, 03:20 AM
I think you mean GL_SEPARATE_SPECULAR_COLOR_EXT
and I think you want something like:
// should be in glext.h
#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
#define GL_SINGLE_COLOR_EXT 0x81F9
#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
// check that extension exists before enabling - note, CheckGLExt() is a custom
// function that takes the extension string and searches it to find the requested extension
// enable the extension
glLightModelf ( GL_LIGHT_MODEL_COLOR_CONTROL_EXT,GL_SEPARATE_SPECU LAR_COLOR_EXT);
that should give you seperate specular highlights, If you want colours in the vertex array to determine the specular color of the geometry, then use glColorMaterial.
[This message has been edited by Rob The Bloke (edited 12-21-2001).]
12-21-2001, 11:21 PM
Yes, that is just what I wanted. Thanks.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.