Definition at line 104 of file openGL_bounce.c.
◆ Checkerboard()
Checkerboard::Checkerboard |
( |
int |
width, |
|
|
int |
depth |
|
) |
| |
|
inline |
◆ centerx()
double Checkerboard::centerx |
( |
| ) |
|
|
inline |
◆ centerz()
double Checkerboard::centerz |
( |
| ) |
|
|
inline |
◆ create()
void Checkerboard::create |
( |
| ) |
|
|
inline |
Definition at line 120 of file openGL_bounce.c.
123 GLfloat lightPosition[] = {4, 3, 7, 1};
124 glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
128 for (
int x = 0; x <
width - 1; x++) {
129 for (
int z = 0; z <
depth - 1; z++) {
130 glMaterialfv(GL_FRONT,
131 GL_AMBIENT_AND_DIFFUSE,
135 glVertex3d(x + 1, 0, z);
136 glVertex3d(x + 1, 0, z + 1);
137 glVertex3d(x, 0, z + 1);
References depth, displayListId, RED, WHITE, and width.
Referenced by init().
◆ draw()
void Checkerboard::draw |
( |
| ) |
|
|
inline |
◆ depth
◆ displayListId
int Checkerboard::displayListId |
|
private |
◆ width
The documentation for this class was generated from the following file: