summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/gles2_implementation_autogen.h
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-08 22:00:10 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-08 22:00:10 +0000
commit4e8a5b125ab20cdeeba546c8c656062165087afa (patch)
tree4e7cbddda9de296df908c13be3df6901a94ed0e4 /gpu/command_buffer/client/gles2_implementation_autogen.h
parentb2134acfa36836b9ec250c02fc83f75f3a2073d7 (diff)
downloadchromium_src-4e8a5b125ab20cdeeba546c8c656062165087afa.zip
chromium_src-4e8a5b125ab20cdeeba546c8c656062165087afa.tar.gz
chromium_src-4e8a5b125ab20cdeeba546c8c656062165087afa.tar.bz2
Resubmit CL http://codereview.chromium.org/1992008/
TEST=none BUG=none Review URL: http://codereview.chromium.org/2013010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation_autogen.h')
-rw-r--r--gpu/command_buffer/client/gles2_implementation_autogen.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index 63d0b53..ae826d8 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -167,6 +167,10 @@ void CullFace(GLenum mode) {
}
void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
+ if (n < 0) {
+ SetGLError(GL_INVALID_VALUE, "glDeleteFramebuffers: n < 0");
+ return;
+ }
framebuffer_id_handler_->FreeIds(n, framebuffers);
helper_->DeleteFramebuffersImmediate(n, framebuffers);
}
@@ -177,6 +181,10 @@ void DeleteProgram(GLuint program) {
}
void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
+ if (n < 0) {
+ SetGLError(GL_INVALID_VALUE, "glDeleteRenderbuffers: n < 0");
+ return;
+ }
renderbuffer_id_handler_->FreeIds(n, renderbuffers);
helper_->DeleteRenderbuffersImmediate(n, renderbuffers);
}
@@ -187,6 +195,10 @@ void DeleteShader(GLuint shader) {
}
void DeleteTextures(GLsizei n, const GLuint* textures) {
+ if (n < 0) {
+ SetGLError(GL_INVALID_VALUE, "glDeleteTextures: n < 0");
+ return;
+ }
texture_id_handler_->FreeIds(n, textures);
helper_->DeleteTexturesImmediate(n, textures);
}
@@ -240,6 +252,10 @@ void FrontFace(GLenum mode) {
}
void GenBuffers(GLsizei n, GLuint* buffers) {
+ if (n < 0) {
+ SetGLError(GL_INVALID_VALUE, "glGenBuffers: n < 0");
+ return;
+ }
buffer_id_handler_->MakeIds(0, n, buffers);
helper_->GenBuffersImmediate(n, buffers);
}
@@ -249,16 +265,28 @@ void GenerateMipmap(GLenum target) {
}
void GenFramebuffers(GLsizei n, GLuint* framebuffers) {
+ if (n < 0) {
+ SetGLError(GL_INVALID_VALUE, "glGenFramebuffers: n < 0");
+ return;
+ }
framebuffer_id_handler_->MakeIds(0, n, framebuffers);
helper_->GenFramebuffersImmediate(n, framebuffers);
}
void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
+ if (n < 0) {
+ SetGLError(GL_INVALID_VALUE, "glGenRenderbuffers: n < 0");
+ return;
+ }
renderbuffer_id_handler_->MakeIds(0, n, renderbuffers);
helper_->GenRenderbuffersImmediate(n, renderbuffers);
}
void GenTextures(GLsizei n, GLuint* textures) {
+ if (n < 0) {
+ SetGLError(GL_INVALID_VALUE, "glGenTextures: n < 0");
+ return;
+ }
texture_id_handler_->MakeIds(0, n, textures);
helper_->GenTexturesImmediate(n, textures);
}
@@ -762,5 +790,9 @@ void DeleteSharedIds(GLuint namespace_id, GLsizei n, const GLuint* ids);
void RegisterSharedIds(GLuint namespace_id, GLsizei n, const GLuint* ids);
+void CommandBufferEnable(GLenum cap, GLboolean enable) {
+ helper_->CommandBufferEnable(cap, enable);
+}
+
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_