Jake
Jake

Reputation: 2907

Global Ambient Lighting?

Lets say my display function draws polygons pixel by pixel not using opengl functions, but a drawpixel function.
I call

   glLightModelfv(GL_LIGHT_MODEL_AMBIENT, global_ambient);
    glShadeModel(GL_SMOOTH);
    glEnable(GL_LIGHTING);

where global_ambient is 0.0, 0.0, 0.0, 1.0 and I have material parameters defined, that is glmaterial is never called. Would the global ambient lighting still work as in I will not be able to see the polygon? Or would I need to define material parameters.

Upvotes: 2

Views: 690

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 473192

Lets say my display function draws polygons pixel by pixel not using opengl functions, but a drawpixel function.

If that's true, then the lighting state is completely irrelevant. Fixed-function OpenGL lighting is per-vertex. You're not sending vertices; you're sending pixel data.

Upvotes: 1

Related Questions