Porting Shading Models

Like IRIS GL, OpenGL lets you switch between smooth (Gouraud) shading and flat shading. The following table lists the IRIS GL shading and dithering functions and their equivalent OpenGL functions.

IRIS GL Function OpenGL Function Meaning
shademodel(FLAT) glShadeModel(GL_FLAT) Do flat shading.
shademodel(GOURAUD) glShadeModel(GL_SMOOTH) Do smooth shading.
getsm glGet(GL_SHADE_MODEL) Return current shade model.
dither(DT_ON)

dither(DT_OFF)

glEnable(GL_DITHER)

glDisable(GL_DITHER)

Turn dithering on/off.