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

Unified Diff: gpu/command_buffer/client/gles2_demo_cc.cc

Issue 5254006: Initialize destinations variables before calling GL functions... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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
« no previous file with comments | « gpu/command_buffer/client/gles2_c_lib_autogen.h ('k') | media/tools/player_x11/gl_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_demo_cc.cc
===================================================================
--- gpu/command_buffer/client/gles2_demo_cc.cc (revision 68425)
+++ gpu/command_buffer/client/gles2_demo_cc.cc (working copy)
@@ -47,7 +47,7 @@
// Compile the shader
glCompileShader(shader);
// Check the compile status
- GLint value;
+ GLint value = 0;
glGetShaderiv(shader, GL_COMPILE_STATUS, &value);
if (value == 0) {
char buffer[1024];
@@ -100,7 +100,7 @@
// Link the program
glLinkProgram(programObject);
// Check the link status
- GLint linked;
+ GLint linked = 0;
glGetProgramiv(programObject, GL_LINK_STATUS, &linked);
if (linked == 0) {
char buffer[1024];
@@ -173,6 +173,10 @@
g_texture = CreateCheckerboardTexture();
InitShaders();
CheckGLError("GLFromCPPInit", __LINE__);
+
+ char buf[128];
+ glReadPixels(0, 0, 1, 1, 0, 0, buf);
+ CheckGLError("GLFromCPPInit:ReadPixels", __LINE__);
}
void GLFromCPPDraw() {
« no previous file with comments | « gpu/command_buffer/client/gles2_c_lib_autogen.h ('k') | media/tools/player_x11/gl_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698