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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // can test against them without modifying the values we | 218 // can test against them without modifying the values we |
219 // generated. | 219 // generated. |
220 glStencilMask( 0x0 ); | 220 glStencilMask( 0x0 ); |
221 offset += 6; | 221 offset += 6; |
222 for ( i = 0; i < NumTests; ++i ) | 222 for ( i = 0; i < NumTests; ++i ) |
223 { | 223 { |
224 glStencilFunc( GL_EQUAL, stencilValues[i], 0xff ); | 224 glStencilFunc( GL_EQUAL, stencilValues[i], 0xff ); |
225 glUniform4fv( userData->colorLoc, 1, colors[i] ); | 225 glUniform4fv( userData->colorLoc, 1, colors[i] ); |
226 glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, offset ); | 226 glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, offset ); |
227 } | 227 } |
| 228 glStencilMask( 0xff ); |
228 } | 229 } |
229 | 230 |
230 /// | 231 /// |
231 // Cleanup | 232 // Cleanup |
232 // | 233 // |
233 void stShutDown ( ESContext *esContext ) | 234 void stShutDown ( ESContext *esContext ) |
234 { | 235 { |
235 STUserData *userData = esContext->userData; | 236 STUserData *userData = esContext->userData; |
236 | 237 |
237 // Delete program object | 238 // Delete program object |
238 glDeleteProgram ( userData->programObject ); | 239 glDeleteProgram ( userData->programObject ); |
239 | 240 |
240 // Delete vertex buffer objects | 241 // Delete vertex buffer objects |
241 glDeleteBuffers ( 2, userData->vboIds ); | 242 glDeleteBuffers ( 2, userData->vboIds ); |
242 } | 243 } |
OLD | NEW |