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

Unified Diff: third_party/gles2_book/Common/Source/esShader.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 side-by-side diff with in-line comments
Download patch
Index: third_party/gles2_book/Common/Source/esShader.c
===================================================================
--- third_party/gles2_book/Common/Source/esShader.c (revision 93075)
+++ third_party/gles2_book/Common/Source/esShader.c (working copy)
@@ -42,8 +42,8 @@
//
GLuint esLoadShader ( GLenum type, const char *shaderSrc )
{
- GLuint shader;
- GLint compiled;
+ GLuint shader = 0;
+ GLint compiled = 0;
// Create the shader object
shader = glCreateShader ( type );
@@ -95,10 +95,10 @@
//
GLuint esLoadProgram ( const char *vertShaderSrc, const char *fragShaderSrc )
{
- GLuint vertexShader;
- GLuint fragmentShader;
- GLuint programObject;
- GLint linked;
+ GLuint vertexShader = 0;
+ GLuint fragmentShader = 0;
+ GLuint programObject = 0;
+ GLint linked = 0;
// Load the vertex/fragment shaders
vertexShader = esLoadShader ( GL_VERTEX_SHADER, vertShaderSrc );
« no previous file with comments | « third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c ('k') | third_party/gles2_book/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698