Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c

Issue 7448011: Initialized variables passed to GL functions. Command buffer now only allows initialized variable... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/gles2_book/Common/Source/esShader.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | third_party/gles2_book/Common/Source/esShader.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698