本文整理汇总了C++中GLContext::WorkAroundDriverBugs方法的典型用法代码示例。如果您正苦于以下问题:C++ GLContext::WorkAroundDriverBugs方法的具体用法?C++ GLContext::WorkAroundDriverBugs怎么用?C++ GLContext::WorkAroundDriverBugs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLContext
的用法示例。
在下文中一共展示了GLContext::WorkAroundDriverBugs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: autoRB
GLint
WebGLRenderbuffer::GetRenderbufferParameter(GLenum target, GLenum pname) const {
GLContext* gl = mContext->gl;
switch (pname) {
case LOCAL_GL_RENDERBUFFER_STENCIL_SIZE: {
if (NeedsDepthStencilEmu(mContext->gl, InternalFormatForGL())) {
if (gl->WorkAroundDriverBugs() &&
gl->Renderer() == GLContext::RendererTegra)
{
return 8;
}
ScopedBindRenderbuffer autoRB(gl, mSecondaryRB);
GLint i = 0;
gl->fGetRenderbufferParameteriv(target, pname, &i);
return i;
}
// Fall through otherwise.
}
case LOCAL_GL_RENDERBUFFER_WIDTH:
case LOCAL_GL_RENDERBUFFER_HEIGHT:
case LOCAL_GL_RENDERBUFFER_RED_SIZE:
case LOCAL_GL_RENDERBUFFER_GREEN_SIZE:
case LOCAL_GL_RENDERBUFFER_BLUE_SIZE:
case LOCAL_GL_RENDERBUFFER_ALPHA_SIZE:
case LOCAL_GL_RENDERBUFFER_DEPTH_SIZE: {
GLint i = 0;
gl->fGetRenderbufferParameteriv(target, pname, &i);
return i;
}
}
MOZ_ASSERT(false, "This function should only be called with valid `pname`.");
return 0;
}