13.07.2015 Views

Rendering, OpenGL, and Lighting - Caltech

Rendering, OpenGL, and Lighting - Caltech

Rendering, OpenGL, and Lighting - Caltech

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>OpenGL</strong> geometry/rendering• glShade(GL_SMOOTH / GL_FLAT)– Tells <strong>OpenGL</strong> whether to use per-vertex lighting(Gouraud) or per-face lighting (flat)– For fixed pipeline, this won’t matter when we useGPU shaders (we'll override the default lighting)• <strong>Lighting</strong> functions to set up light state– Same for material properties– Generally done during initialization; take a look athomework 1 code to see how it’s done– Light <strong>and</strong> material state can be read in GPU code,so it’s still useful

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!