mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 12:07:52 +00:00
Bug 1170855 - Part B: READ_BUFFER requires emulation for default FB. r=jgilbert
WebGL internals use framebuffers to implement the default framebuffer. This means that we can't just return the result from glGetIntegerv(GL_READ_BUFFER, ...)
This commit is contained in:
parent
251cafde87
commit
f83220f26e
@ -38,8 +38,17 @@ WebGL2Context::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv)
|
||||
}
|
||||
|
||||
/* GLenum */
|
||||
case LOCAL_GL_READ_BUFFER: {
|
||||
if (mBoundReadFramebuffer) {
|
||||
GLint val = LOCAL_GL_NONE;
|
||||
gl->fGetIntegerv(pname, &val);
|
||||
return JS::Int32Value(val);
|
||||
}
|
||||
|
||||
return JS::Int32Value(LOCAL_GL_BACK);
|
||||
}
|
||||
|
||||
case LOCAL_GL_FRAGMENT_SHADER_DERIVATIVE_HINT:
|
||||
case LOCAL_GL_READ_BUFFER:
|
||||
/* fall through */
|
||||
|
||||
/* GLint */
|
||||
|
Loading…
x
Reference in New Issue
Block a user