Sign in to follow this  

Lighting + Color

Recommended Posts

Or the simpliest way is to use parameter glMaterialf (or glMaterialfv)!
There are few types of material:
glMaterialfv(first parameter, second parameter, float variable[]);
first parameter can be GL_FRONT (just front faces directing to light), GL_BACK (just back faces) or GL_FRONT_AND_BACK (front and back faces)
second parameter can be GL_DIFFUSE, GL_SPECULAR, GL_EMISSION, GL_AMBIENT and GL_SHININESS (but if you write shininess, next value must be just one float! and it's written by glMaterialf (NOT glMaterialfv), another parameters-> 4 floats in variable).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this