OLD | NEW |
1 // | 1 // |
2 // Book: OpenGL(R) ES 2.0 Programming Guide | 2 // Book: OpenGL(R) ES 2.0 Programming Guide |
3 // Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner | 3 // Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner |
4 // ISBN-10: 0321502795 | 4 // ISBN-10: 0321502795 |
5 // ISBN-13: 9780321502797 | 5 // ISBN-13: 9780321502797 |
6 // Publisher: Addison-Wesley Professional | 6 // Publisher: Addison-Wesley Professional |
7 // URLs: http://safari.informit.com/9780321563835 | 7 // URLs: http://safari.informit.com/9780321563835 |
8 // http://www.opengles-book.com | 8 // http://www.opengles-book.com |
9 // | 9 // |
10 | 10 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 STUserData *userData = esContext->userData; | 114 STUserData *userData = esContext->userData; |
115 | 115 |
116 #define NumTests 4 | 116 #define NumTests 4 |
117 GLfloat colors[NumTests][4] = { | 117 GLfloat colors[NumTests][4] = { |
118 { 1.0f, 0.0f, 0.0f, 1.0f }, | 118 { 1.0f, 0.0f, 0.0f, 1.0f }, |
119 { 0.0f, 1.0f, 0.0f, 1.0f }, | 119 { 0.0f, 1.0f, 0.0f, 1.0f }, |
120 { 0.0f, 0.0f, 1.0f, 1.0f }, | 120 { 0.0f, 0.0f, 1.0f, 1.0f }, |
121 { 1.0f, 1.0f, 0.0f, 0.0f } | 121 { 1.0f, 1.0f, 0.0f, 0.0f } |
122 }; | 122 }; |
123 | 123 |
124 GLint numStencilBits; | 124 GLint numStencilBits = 0; |
125 GLuint stencilValues[NumTests] = { | 125 GLuint stencilValues[NumTests] = { |
126 0x7, // Result of test 0 | 126 0x7, // Result of test 0 |
127 0x0, // Result of test 1 | 127 0x0, // Result of test 1 |
128 0x2, // Result of test 2 | 128 0x2, // Result of test 2 |
129 0xff // Result of test 3. We need to fill this | 129 0xff // Result of test 3. We need to fill this |
130 // value in a run-time | 130 // value in a run-time |
131 }; | 131 }; |
132 | 132 |
133 // Set the viewport | 133 // Set the viewport |
134 glViewport ( 0, 0, esContext->width, esContext->height ); | 134 glViewport ( 0, 0, esContext->width, esContext->height ); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 void stShutDown ( ESContext *esContext ) | 243 void stShutDown ( ESContext *esContext ) |
244 { | 244 { |
245 STUserData *userData = esContext->userData; | 245 STUserData *userData = esContext->userData; |
246 | 246 |
247 // Delete program object | 247 // Delete program object |
248 glDeleteProgram ( userData->programObject ); | 248 glDeleteProgram ( userData->programObject ); |
249 | 249 |
250 // Delete vertex buffer objects | 250 // Delete vertex buffer objects |
251 glDeleteBuffers ( 2, userData->vboIds ); | 251 glDeleteBuffers ( 2, userData->vboIds ); |
252 } | 252 } |
OLD | NEW |