diff options
Diffstat (limited to 'gpu/command_buffer/tests/gl_test_utils.h')
-rw-r--r-- | gpu/command_buffer/tests/gl_test_utils.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gpu/command_buffer/tests/gl_test_utils.h b/gpu/command_buffer/tests/gl_test_utils.h index 15a726e..802d54d 100644 --- a/gpu/command_buffer/tests/gl_test_utils.h +++ b/gpu/command_buffer/tests/gl_test_utils.h @@ -18,11 +18,19 @@ class GLTestHelper { static bool CheckGLError(const char* msg, int line); // Compiles a shader. - // Returns shader, 0 on failure.. + // Does not check for errors, always returns shader. + static GLuint CompileShader(GLenum type, const char* shaderSrc); + + // Compiles a shader and checks for compilation errors. + // Returns shader, 0 on failure. static GLuint LoadShader(GLenum type, const char* shaderSrc); // Attaches 2 shaders and links them to a program. - // Returns program, 0 on failure.. + // Does not check for errors, always returns program. + static GLuint LinkProgram(GLuint vertex_shader, GLuint fragment_shader); + + // Attaches 2 shaders, links them to a program, and checks for errors. + // Returns program, 0 on failure. static GLuint SetupProgram(GLuint vertex_shader, GLuint fragment_shader); // Compiles 2 shaders, attaches and links them to a program |