mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Adds glRenderBufferStorageMultisample, extension detection for framebuffer_multisample
This commit is contained in:
parent
02e706721b
commit
e3dedb255f
@ -389,6 +389,18 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
|
||||
mInitialized = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsExtensionSupported(GLContext::ANGLE_framebuffer_multisample) ||
|
||||
IsExtensionSupported(GLContext::EXT_framebuffer_multisample)) {
|
||||
SymLoadStruct auxSymbols[] = {
|
||||
{ (PRFuncPtr*) &mSymbols.fRenderbufferStorageMultisample, { "RenderbufferStorageMultisample", "RenderbufferStorageMultisampleEXT", "RenderbufferStorageMultisampleANGLE", NULL } },
|
||||
{ NULL, { NULL } },
|
||||
};
|
||||
if (!LoadSymbols(&auxSymbols[0], trygl, prefix)) {
|
||||
NS_RUNTIMEABORT("GL supports framebuffer_multisample without supplying glRenderbufferStorageMultisample");
|
||||
mInitialized = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mInitialized) {
|
||||
@ -455,6 +467,8 @@ static const char *sExtensionNames[] = {
|
||||
"GL_OES_standard_derivatives",
|
||||
"GL_EXT_framebuffer_blit",
|
||||
"GL_ANGLE_framebuffer_blit",
|
||||
"GL_EXT_framebuffer_multisample",
|
||||
"GL_ANGLE_framebuffer_multisample",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -792,6 +792,10 @@ public:
|
||||
return mOffscreenTexture;
|
||||
}
|
||||
|
||||
virtual bool SupportsFramebufferMultisample() {
|
||||
return IsExtensionSupported(EXT_framebuffer_multisample) || IsExtensionSupported(ANGLE_framebuffer_multisample);
|
||||
}
|
||||
|
||||
virtual bool SupportsOffscreenSplit() {
|
||||
return IsExtensionSupported(EXT_framebuffer_blit) || IsExtensionSupported(ANGLE_framebuffer_blit);
|
||||
}
|
||||
@ -1234,6 +1238,8 @@ public:
|
||||
OES_standard_derivatives,
|
||||
EXT_framebuffer_blit,
|
||||
ANGLE_framebuffer_blit,
|
||||
EXT_framebuffer_multisample,
|
||||
ANGLE_framebuffer_multisample,
|
||||
Extensions_Max
|
||||
};
|
||||
|
||||
@ -2333,6 +2339,12 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fRenderbufferStorageMultisample(target, samples, internalFormat, width, height);
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fDepthRange(GLclampf a, GLclampf b) {
|
||||
BEFORE_GL_CALL;
|
||||
if (mIsGLES2) {
|
||||
|
@ -309,6 +309,8 @@ struct GLContextSymbols
|
||||
|
||||
typedef void (GLAPIENTRY * PFNGLBLITFRAMEBUFFER) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
PFNGLBLITFRAMEBUFFER fBlitFramebuffer;
|
||||
typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLE) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height);
|
||||
PFNGLRENDERBUFFERSTORAGEMULTISAMPLE fRenderbufferStorageMultisample;
|
||||
|
||||
|
||||
/* These are different between GLES2 and desktop GL; we hide those differences, use the GL
|
||||
|
Loading…
Reference in New Issue
Block a user