зеркало из https://github.com/mozilla/pjs.git
Bug 670025: Use more fine-grained checks to pick depth in GLContext::ResizeOffscreenFBO. r=vlad
This commit is contained in:
Родитель
39b7c8c4a9
Коммит
576ffaf0c1
|
@ -1009,21 +1009,22 @@ GLContext::ResizeOffscreenFBO(const gfxIntSize& aSize)
|
||||||
if (mIsGLES2) {
|
if (mIsGLES2) {
|
||||||
if (IsExtensionSupported(OES_depth32)) {
|
if (IsExtensionSupported(OES_depth32)) {
|
||||||
depthType = LOCAL_GL_DEPTH_COMPONENT32;
|
depthType = LOCAL_GL_DEPTH_COMPONENT32;
|
||||||
|
cf.depth = 32;
|
||||||
} else if (IsExtensionSupported(OES_depth24)) {
|
} else if (IsExtensionSupported(OES_depth24)) {
|
||||||
depthType = LOCAL_GL_DEPTH_COMPONENT24;
|
depthType = LOCAL_GL_DEPTH_COMPONENT24;
|
||||||
|
cf.depth = 24;
|
||||||
} else {
|
} else {
|
||||||
depthType = LOCAL_GL_DEPTH_COMPONENT16;
|
depthType = LOCAL_GL_DEPTH_COMPONENT16;
|
||||||
|
cf.depth = 16;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
depthType = LOCAL_GL_DEPTH_COMPONENT24;
|
depthType = LOCAL_GL_DEPTH_COMPONENT24;
|
||||||
|
cf.depth = 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
fBindRenderbuffer(LOCAL_GL_RENDERBUFFER, mOffscreenDepthRB);
|
fBindRenderbuffer(LOCAL_GL_RENDERBUFFER, mOffscreenDepthRB);
|
||||||
fRenderbufferStorage(LOCAL_GL_RENDERBUFFER,
|
fRenderbufferStorage(LOCAL_GL_RENDERBUFFER, depthType,
|
||||||
mIsGLES2 ? LOCAL_GL_DEPTH_COMPONENT16
|
|
||||||
: LOCAL_GL_DEPTH_COMPONENT24,
|
|
||||||
aSize.width, aSize.height);
|
aSize.width, aSize.height);
|
||||||
cf.depth = mIsGLES2 ? 16 : 24;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stencil) {
|
if (stencil) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче