PDA

View Full Version : glEnable(GL_COLOR_MATERIAL)



matthew
19-03-2007, 16:49
Hi everyone, I've almost completed NeHe Lesson 12 but the Lighting doesn't look right. :P

The original Lesson used GL_COLOR_MATERIAL, any ideas how I'd go about using it in thinBASIC?

Petr Schreiber
19-03-2007, 20:38
Hi Matthew,

more easy to fix when source will be available ;),
following code is in TBGL by default in OpenGL initialization stage


glEnable %GL_COLOR_MATERIAL
glColorMaterial %GL_FRONT_AND_BACK, %GL_AMBIENT_AND_DIFFUSE


The glColorMaterial is set to values which should be default on any OpenGL implementation, I put it there just to make me sure.


Bye,
Petr