Commit 7e584e58 by Nicolas Capens Committed by Nicolas Capens

Fix renderbuffer binding for OpenGL ES 1.1.

glBindRenderbufferOES() doesn't require anything except a non-zero renderbuffer to create a new Renderbuffer object (it is not required to use GenRenderbuffers before using BindRenderbuffer). This had been fixed for GLES 3.0 and 2.0, but the same also applies to GLES 1.1. Note that the Context already properly handles the case where renderbuffer is zero. Bug b/25983901 Change-Id: If5e97be8027fca7c97cce5c44d063cd054443700 Reviewed-on: https://swiftshader-review.googlesource.com/17490Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 57642356
......@@ -166,15 +166,9 @@ void BindRenderbufferOES(GLenum target, GLuint renderbuffer)
if(context)
{
if(renderbuffer != 0 && !context->getRenderbuffer(renderbuffer))
{
// [OpenGL ES 2.0.25] Section 4.4.3 page 112
// [OpenGL ES 3.0.2] Section 4.4.2 page 201
// 'renderbuffer' must be either zero or the name of an existing renderbuffer object of
// type 'renderbuffertarget', otherwise an INVALID_OPERATION error is generated.
return error(GL_INVALID_OPERATION);
}
// [GL_EXT_framebuffer_object]
// If <renderbuffer> is not zero, then the resulting renderbuffer object
// is a new state vector, initialized with a zero-sized memory buffer
context->bindRenderbuffer(renderbuffer);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment