Graphics Reference
In-Depth Information
(continued)
0.25f, 0.25f, 0.90f, // Quad #1
0.75f, 0.25f, 0.90f,
0.75f, 0.75f, 0.90f,
0.25f, 0.75f, 0.90f,
−0.75f, −0.75f, 0.50f, // Quad #2
−0.25f, −0.75f, 0.50f,
−0.25f, −0.25f, 0.50f,
−0.75f, −0.25f, 0.50f,
0.25f, −0.75f, 0.50f, // Quad #3
0.75f, −0.75f, 0.50f,
0.75f, −0.25f, 0.50f,
0.25f, −0.25f, 0.50f,
−1.00f, −1.00f, 0.00f, // Big Quad
1.00f, −1.00f, 0.00f,
1.00f, 1.00f, 0.00f,
−1.00f, 1.00f, 0.00f
};
GLubyte indices[][6] =
{
{ 0, 1, 2, 0, 2, 3 }, // Quad #0
{ 4, 5, 6, 4, 6, 7 }, // Quad #1
{ 8, 9, 10, 8, 10, 11 }, // Quad #2
{ 12, 13, 14, 12, 14, 15 }, // Quad #3
{ 16, 17, 18, 16, 18, 19 } // Big Quad
};
#define NumTests 4
GLfloat colors[NumTests][4] =
{
{ 1.0f, 0.0f, 0.0f, 1.0f },
{ 0.0f, 1.0f, 0.0f, 1.0f },
{ 0.0f, 0.0f, 1.0f, 1.0f },
{ 1.0f, 1.0f, 0.0f, 0.0f }
};
GLint numStencilBits;
GLuint stencilValues[NumTests] =
{
0x7, // Result of test 0
0x0, // Result of test 1
0x2, // Result of test 2
0xff // Result of test 3. We need to fill this
// value in a run-time
};
// Set the viewport
glViewport ( 0, 0, esContext−>width, esContext−>height );
Search WWH ::




Custom Search