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

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

Issue 551057: Commented out precision from shaders. These examples were done on my new desk... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 11 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/Chapter_9/Simple_Texture2D/Simple_Texture2D.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 11 matching lines...) Expand all
22 int stInit ( ESContext *esContext ) 22 int stInit ( ESContext *esContext )
23 { 23 {
24 STUserData *userData = esContext->userData; 24 STUserData *userData = esContext->userData;
25 GLbyte vShaderStr[] = 25 GLbyte vShaderStr[] =
26 "attribute vec4 a_position; \n" 26 "attribute vec4 a_position; \n"
27 "void main() \n" 27 "void main() \n"
28 "{ \n" 28 "{ \n"
29 " gl_Position = a_position; \n" 29 " gl_Position = a_position; \n"
30 "} \n"; 30 "} \n";
31 31
32 // TODO(alokp): Shaders containing "precision" do not compile.
32 GLbyte fShaderStr[] = 33 GLbyte fShaderStr[] =
33 "precision mediump float; \n" 34 "//precision mediump float; \n"
34 "uniform vec4 u_color; \n" 35 "uniform vec4 u_color; \n"
35 "void main() \n" 36 "void main() \n"
36 "{ \n" 37 "{ \n"
37 " gl_FragColor = u_color; \n" 38 " gl_FragColor = u_color; \n"
38 "} \n"; 39 "} \n";
39 40
40 GLfloat vVertices[] = { 41 GLfloat vVertices[] = {
41 -0.75f, 0.25f, 0.50f, // Quad #0 42 -0.75f, 0.25f, 0.50f, // Quad #0
42 -0.25f, 0.25f, 0.50f, 43 -0.25f, 0.25f, 0.50f,
43 -0.25f, 0.75f, 0.50f, 44 -0.25f, 0.75f, 0.50f,
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void stShutDown ( ESContext *esContext ) 244 void stShutDown ( ESContext *esContext )
244 { 245 {
245 STUserData *userData = esContext->userData; 246 STUserData *userData = esContext->userData;
246 247
247 // Delete program object 248 // Delete program object
248 glDeleteProgram ( userData->programObject ); 249 glDeleteProgram ( userData->programObject );
249 250
250 // Delete vertex buffer objects 251 // Delete vertex buffer objects
251 glDeleteBuffers ( 2, userData->vboIds ); 252 glDeleteBuffers ( 2, userData->vboIds );
252 } 253 }
OLDNEW
« no previous file with comments | « no previous file | third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698