Commit 6cf8e1b9 by Geoff Lang

Reduce the number of TextureFormatCaps members.

Since GL has no notion of texture formats that can be used for different types of textures, merge the TextureFormatCaps texture support members. Also merge the various renderability members since the texture type is enough to determine what type of renderable a format is. BUG=angle:658 Change-Id: I7cba50b147fcca8f3880d65c06c57df9c65ed19c Reviewed-on: https://chromium-review.googlesource.com/206830Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent ad8636ee
......@@ -17,14 +17,9 @@ namespace gl
{
TextureCaps::TextureCaps()
: texture2D(false),
textureCubeMap(false),
texture3D(false),
texture2DArray(false),
filtering(false),
colorRendering(false),
depthRendering(false),
stencilRendering(false),
: texturable(false),
filterable(false),
renderable(false),
sampleCounts()
{
}
......@@ -150,23 +145,18 @@ std::vector<std::string> Extensions::getStrings(GLuint clientVersion) const
}
static bool GetFormatSupport(const TextureCapsMap &textureCaps, const std::vector<GLenum> &requiredFormats,
bool requiresFiltering, bool requiresColorBuffer, bool requiresDepthStencil)
bool requiresFiltering, bool requiresRendering)
{
for (size_t i = 0; i < requiredFormats.size(); i++)
{
const TextureCaps &cap = textureCaps.get(requiredFormats[i]);
if (requiresFiltering && !cap.filtering)
if (requiresFiltering && !cap.filterable)
{
return false;
}
if (requiresColorBuffer && !cap.colorRendering)
{
return false;
}
if (requiresDepthStencil && !cap.depthRendering)
if (requiresRendering && !cap.renderable)
{
return false;
}
......@@ -182,7 +172,7 @@ static bool DetermineRGB8AndRGBA8TextureSupport(const TextureCapsMap &textureCap
requiredFormats.push_back(GL_RGB8);
requiredFormats.push_back(GL_RGBA8);
return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
return GetFormatSupport(textureCaps, requiredFormats, true, true);
}
// Checks for GL_EXT_texture_format_BGRA8888 support
......@@ -191,7 +181,7 @@ static bool DetermineBGRA8TextureSupport(const TextureCapsMap &textureCaps)
std::vector<GLenum> requiredFormats;
requiredFormats.push_back(GL_BGRA8_EXT);
return GetFormatSupport(textureCaps, requiredFormats, true, true, false);
return GetFormatSupport(textureCaps, requiredFormats, true, true);
}
// Checks for GL_OES_texture_half_float support
......@@ -201,7 +191,7 @@ static bool DetermineHalfFloatTextureSupport(const TextureCapsMap &textureCaps)
requiredFormats.push_back(GL_RGB16F);
requiredFormats.push_back(GL_RGBA16F);
return GetFormatSupport(textureCaps, requiredFormats, false, true, false);
return GetFormatSupport(textureCaps, requiredFormats, false, true);
}
// Checks for GL_OES_texture_half_float_linear support
......@@ -211,7 +201,7 @@ static bool DetermineHalfFloatTextureFilteringSupport(const TextureCapsMap &text
requiredFormats.push_back(GL_RGB16F);
requiredFormats.push_back(GL_RGBA16F);
return GetFormatSupport(textureCaps, requiredFormats, true, false, false);
return GetFormatSupport(textureCaps, requiredFormats, true, false);
}
// Checks for GL_OES_texture_float support
......@@ -221,7 +211,7 @@ static bool DetermineFloatTextureSupport(const TextureCapsMap &textureCaps)
requiredFormats.push_back(GL_RGB32F);
requiredFormats.push_back(GL_RGBA32F);
return GetFormatSupport(textureCaps, requiredFormats, false, true, false);
return GetFormatSupport(textureCaps, requiredFormats, false, true);
}
// Checks for GL_OES_texture_float_linear support
......@@ -231,7 +221,7 @@ static bool DetermineFloatTextureFilteringSupport(const TextureCapsMap &textureC
requiredFormats.push_back(GL_RGB32F);
requiredFormats.push_back(GL_RGBA32F);
return GetFormatSupport(textureCaps, requiredFormats, true, false, false);
return GetFormatSupport(textureCaps, requiredFormats, true, false);
}
// Checks for GL_EXT_texture_rg support
......@@ -251,7 +241,7 @@ static bool DetermineRGTextureSupport(const TextureCapsMap &textureCaps, bool ch
requiredFormats.push_back(GL_RG32F);
}
return GetFormatSupport(textureCaps, requiredFormats, true, false, false);
return GetFormatSupport(textureCaps, requiredFormats, true, false);
}
// Check for GL_EXT_texture_compression_dxt1
......@@ -261,7 +251,7 @@ static bool DetermineDXT1TextureSupport(const TextureCapsMap &textureCaps)
requiredFormats.push_back(GL_COMPRESSED_RGB_S3TC_DXT1_EXT);
requiredFormats.push_back(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT);
return GetFormatSupport(textureCaps, requiredFormats, true, false, false);
return GetFormatSupport(textureCaps, requiredFormats, true, false);
}
// Check for GL_ANGLE_texture_compression_dxt3
......@@ -270,7 +260,7 @@ static bool DetermineDXT3TextureSupport(const TextureCapsMap &textureCaps)
std::vector<GLenum> requiredFormats;
requiredFormats.push_back(GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE);
return GetFormatSupport(textureCaps, requiredFormats, true, false, false);
return GetFormatSupport(textureCaps, requiredFormats, true, false);
}
// Check for GL_ANGLE_texture_compression_dxt5
......@@ -279,7 +269,7 @@ static bool DetermineDXT5TextureSupport(const TextureCapsMap &textureCaps)
std::vector<GLenum> requiredFormats;
requiredFormats.push_back(GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE);
return GetFormatSupport(textureCaps, requiredFormats, true, false, false);
return GetFormatSupport(textureCaps, requiredFormats, true, false);
}
// Check for GL_ANGLE_texture_compression_dxt5
......@@ -292,8 +282,8 @@ static bool DetermineSRGBTextureSupport(const TextureCapsMap &textureCaps)
std::vector<GLenum> requiredRenderFormats;
requiredRenderFormats.push_back(GL_SRGB8_ALPHA8);
return GetFormatSupport(textureCaps, requiredFilterFormats, true, false, false) &&
GetFormatSupport(textureCaps, requiredRenderFormats, false, true, false);
return GetFormatSupport(textureCaps, requiredFilterFormats, true, false) &&
GetFormatSupport(textureCaps, requiredRenderFormats, false, true);
}
// Check for GL_ANGLE_depth_texture
......@@ -304,7 +294,7 @@ static bool DetermineDepthTextureSupport(const TextureCapsMap &textureCaps)
requiredFormats.push_back(GL_DEPTH_COMPONENT32_OES);
requiredFormats.push_back(GL_DEPTH24_STENCIL8_OES);
return GetFormatSupport(textureCaps, requiredFormats, true, false, true);
return GetFormatSupport(textureCaps, requiredFormats, true, true);
}
// Check for GL_EXT_color_buffer_float
......@@ -319,7 +309,7 @@ static bool DetermineColorBufferFloatSupport(const TextureCapsMap &textureCaps)
requiredFormats.push_back(GL_RGBA32F);
requiredFormats.push_back(GL_R11F_G11F_B10F);
return GetFormatSupport(textureCaps, requiredFormats, false, true, false);
return GetFormatSupport(textureCaps, requiredFormats, false, true);
}
void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps)
......
......@@ -21,14 +21,14 @@ struct TextureCaps
{
TextureCaps();
bool texture2D;
bool textureCubeMap;
bool texture3D;
bool texture2DArray;
bool filtering;
bool colorRendering;
bool depthRendering;
bool stencilRendering;
// Supports for basic texturing: glTexImage, glTexSubImage, etc
bool texturable;
// Support for linear or anisotropic filtering
bool filterable;
// Support for being used as a framebuffer attachment or renderbuffer format
bool renderable;
std::set<GLuint> sampleCounts;
};
......
......@@ -753,30 +753,25 @@ void Context::setFramebufferZero(Framebuffer *buffer)
void Context::setRenderbufferStorage(GLsizei width, GLsizei height, GLenum internalformat, GLsizei samples)
{
const TextureCaps &formatCaps = getTextureCaps().get(internalformat);
ASSERT(getTextureCaps().get(internalformat).renderable);
RenderbufferStorage *renderbuffer = NULL;
if (formatCaps.colorRendering)
{
renderbuffer = new gl::Colorbuffer(mRenderer,width, height, internalformat, samples);
}
else if (formatCaps.depthRendering && formatCaps.stencilRendering)
if (GetDepthBits(internalformat) > 0 && GetStencilBits(internalformat) > 0)
{
renderbuffer = new gl::DepthStencilbuffer(mRenderer, width, height, samples);
}
else if (formatCaps.depthRendering)
else if (GetDepthBits(internalformat) > 0)
{
renderbuffer = new gl::Depthbuffer(mRenderer, width, height, samples);
}
else if (formatCaps.stencilRendering)
else if (GetStencilBits(internalformat) > 0)
{
renderbuffer = new gl::Stencilbuffer(mRenderer, width, height, samples);
}
else
{
UNREACHABLE();
return;
renderbuffer = new gl::Colorbuffer(mRenderer, width, height, internalformat, samples);
}
mState.getCurrentRenderbuffer()->setStorage(renderbuffer);
......
......@@ -366,20 +366,19 @@ GLenum Framebuffer::completeness() const
const TextureCaps &formatCaps = mRenderer->getRendererTextureCaps().get(internalformat);
if (colorbuffer->isTexture())
{
if (!formatCaps.colorRendering)
if (!formatCaps.renderable)
{
return GL_FRAMEBUFFER_UNSUPPORTED;
}
if (gl::GetDepthBits(internalformat) > 0 ||
gl::GetStencilBits(internalformat) > 0)
if (gl::GetDepthBits(internalformat) > 0 || gl::GetStencilBits(internalformat) > 0)
{
return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
}
}
else
{
if (!formatCaps.colorRendering)
if (!formatCaps.renderable || gl::GetDepthBits(internalformat) > 0 || gl::GetStencilBits(internalformat) > 0)
{
return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
}
......@@ -455,7 +454,7 @@ GLenum Framebuffer::completeness() const
return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
}
if (!formatCaps.depthRendering)
if (!formatCaps.renderable)
{
return GL_FRAMEBUFFER_UNSUPPORTED;
}
......@@ -467,7 +466,7 @@ GLenum Framebuffer::completeness() const
}
else
{
if (!formatCaps.depthRendering)
if (!formatCaps.renderable || gl::GetDepthBits(internalformat) == 0)
{
return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
}
......@@ -512,7 +511,7 @@ GLenum Framebuffer::completeness() const
return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
}
if (!formatCaps.stencilRendering)
if (!formatCaps.renderable)
{
return GL_FRAMEBUFFER_UNSUPPORTED;
}
......@@ -524,7 +523,7 @@ GLenum Framebuffer::completeness() const
}
else
{
if (!formatCaps.stencilRendering)
if (!formatCaps.renderable || gl::GetStencilBits(internalformat) == 0)
{
return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
}
......
......@@ -1049,7 +1049,7 @@ bool Texture2DArray::isSamplerComplete(const SamplerState &samplerState) const
}
// TODO(geofflang): use context's texture caps
if (!mRenderer->getRendererTextureCaps().get(getBaseLevelInternalFormat()).filtering)
if (!mRenderer->getRendererTextureCaps().get(getBaseLevelInternalFormat()).filterable)
{
if (samplerState.magFilter != GL_NEAREST ||
(samplerState.minFilter != GL_NEAREST && samplerState.minFilter != GL_NEAREST_MIPMAP_NEAREST))
......
......@@ -2004,8 +2004,8 @@ void __stdcall glGenerateMipmap(GLenum target)
internalFormat == GL_LUMINANCE8_ALPHA8_EXT ||
internalFormat == GL_ALPHA8_EXT;
if (formatCaps.depthRendering || !formatCaps.filtering || (!formatCaps.colorRendering && !isLUMA) ||
gl::IsFormatCompressed(internalFormat))
if (gl::GetDepthBits(internalFormat) > 0 || gl::GetStencilBits(internalFormat) > 0 || !formatCaps.filterable ||
(!formatCaps.renderable && !isLUMA) || gl::IsFormatCompressed(internalFormat))
{
return gl::error(GL_INVALID_OPERATION);
}
......@@ -9612,7 +9612,7 @@ void __stdcall glGetInternalformativ(GLenum target, GLenum internalformat, GLenu
}
const gl::TextureCaps &formatCaps = context->getTextureCaps().get(internalformat);
if (!formatCaps.colorRendering && !formatCaps.depthRendering && !formatCaps.stencilRendering)
if (!formatCaps.renderable)
{
return gl::error(GL_INVALID_ENUM);
}
......
......@@ -449,7 +449,7 @@ bool TextureD3D_2D::isSamplerComplete(const gl::SamplerState &samplerState) cons
return false;
}
if (!mRenderer->getRendererTextureCaps().get(getInternalFormat(0)).filtering)
if (!mRenderer->getRendererTextureCaps().get(getInternalFormat(0)).filterable)
{
if (samplerState.magFilter != GL_NEAREST ||
(samplerState.minFilter != GL_NEAREST && samplerState.minFilter != GL_NEAREST_MIPMAP_NEAREST))
......@@ -1027,7 +1027,7 @@ bool TextureD3D_Cube::isSamplerComplete(const gl::SamplerState &samplerState) co
bool mipmapping = IsMipmapFiltered(samplerState);
// TODO(geofflang): use context's texture caps
if (!mRenderer->getRendererTextureCaps().get(getInternalFormat(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0)).filtering)
if (!mRenderer->getRendererTextureCaps().get(getInternalFormat(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0)).filterable)
{
if (samplerState.magFilter != GL_NEAREST ||
(samplerState.minFilter != GL_NEAREST && samplerState.minFilter != GL_NEAREST_MIPMAP_NEAREST))
......@@ -1649,7 +1649,7 @@ bool TextureD3D_3D::isSamplerComplete(const gl::SamplerState &samplerState) cons
}
// TODO(geofflang): use context's texture caps
if (!mRenderer->getRendererTextureCaps().get(getInternalFormat(0)).filtering)
if (!mRenderer->getRendererTextureCaps().get(getInternalFormat(0)).filterable)
{
if (samplerState.magFilter != GL_NEAREST ||
(samplerState.minFilter != GL_NEAREST && samplerState.minFilter != GL_NEAREST_MIPMAP_NEAREST))
......
......@@ -2708,7 +2708,7 @@ bool Renderer11::supportsFastCopyBufferToTexture(GLenum internalFormat) const
}
// We cannot support direct copies to non-color-renderable formats
if (!getRendererTextureCaps().get(internalFormat).colorRendering)
if (gl_d3d11::GetRTVFormat(internalFormat) != DXGI_FORMAT_UNKNOWN)
{
return false;
}
......
......@@ -233,14 +233,20 @@ static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, ID3D11De
UINT formatSupport;
if (SUCCEEDED(device->CheckFormatSupport(textureFormat, &formatSupport)))
{
textureCaps.texture2D = (formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE2D) != 0;
textureCaps.textureCubeMap = (formatSupport & D3D11_FORMAT_SUPPORT_TEXTURECUBE) != 0;
textureCaps.texture3D = (formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE3D) != 0;
textureCaps.texture2DArray = (formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE2D) != 0;
if (gl::GetDepthBits(internalFormat) > 0 || gl::GetStencilBits(internalFormat) > 0)
{
textureCaps.texturable = ((formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE2D) != 0);
}
else
{
textureCaps.texturable = ((formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE2D) != 0) &&
((formatSupport & D3D11_FORMAT_SUPPORT_TEXTURECUBE) != 0) &&
((formatSupport & D3D11_FORMAT_SUPPORT_TEXTURE3D) != 0);
}
}
if (SUCCEEDED(device->CheckFormatSupport(renderFormat, &formatSupport)) &&
(formatSupport & D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET))
((formatSupport & D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET) != 0))
{
for (size_t sampleCount = 1; sampleCount <= D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT; sampleCount++)
{
......@@ -253,23 +259,12 @@ static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, ID3D11De
}
}
if (SUCCEEDED(device->CheckFormatSupport(srvFormat, &formatSupport)))
{
textureCaps.filtering = (formatSupport & D3D11_FORMAT_SUPPORT_SHADER_SAMPLE) != 0;
}
if (SUCCEEDED(device->CheckFormatSupport(rtvFormat, &formatSupport)))
{
textureCaps.colorRendering = (formatSupport & D3D11_FORMAT_SUPPORT_RENDER_TARGET) != 0;
}
if (SUCCEEDED(device->CheckFormatSupport(dsvFormat, &formatSupport)))
{
textureCaps.depthRendering = gl::GetDepthBits(internalFormat) > 0 &&
(formatSupport & D3D11_FORMAT_SUPPORT_DEPTH_STENCIL) != 0;
textureCaps.stencilRendering = gl::GetStencilBits(internalFormat) > 0 &&
(formatSupport & D3D11_FORMAT_SUPPORT_DEPTH_STENCIL) != 0;
}
textureCaps.filterable = SUCCEEDED(device->CheckFormatSupport(srvFormat, &formatSupport)) &&
((formatSupport & D3D11_FORMAT_SUPPORT_SHADER_SAMPLE)) != 0;
textureCaps.renderable = (SUCCEEDED(device->CheckFormatSupport(rtvFormat, &formatSupport)) &&
((formatSupport & D3D11_FORMAT_SUPPORT_RENDER_TARGET)) != 0) ||
(SUCCEEDED(device->CheckFormatSupport(dsvFormat, &formatSupport)) &&
((formatSupport & D3D11_FORMAT_SUPPORT_DEPTH_STENCIL) != 0));
return textureCaps;
}
......
......@@ -256,42 +256,23 @@ static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, IDirect3
{
gl::TextureCaps textureCaps;
D3DFORMAT textureFormat = gl_d3d9::GetTextureFormat(internalFormat);
D3DFORMAT renderFormat = gl_d3d9::GetRenderFormat(internalFormat);
textureCaps.texture2D = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
0, D3DRTYPE_TEXTURE, textureFormat));
textureCaps.textureCubeMap = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
0, D3DRTYPE_CUBETEXTURE, textureFormat));
// D3D9 Renderer doesn't support 3D textures
//textureCaps.setTexture3DSupport(SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, currentDisplayMode.Format,
// 0, D3DRTYPE_VOLUMETEXTURE, textureFormat)));
textureCaps.texture3D = false;
// D3D9 doesn't support 2D array textures
textureCaps.texture2DArray = false;
textureCaps.filtering = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
D3DUSAGE_QUERY_FILTER, D3DRTYPE_TEXTURE, textureFormat));
textureCaps.colorRendering = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, textureFormat)) ||
SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, renderFormat));
textureCaps.depthRendering = gl::GetDepthBits(internalFormat) > 0 &&
(SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, textureFormat)) ||
SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, renderFormat)));
textureCaps.stencilRendering = gl::GetStencilBits(internalFormat) > 0 &&
(SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, textureFormat)) ||
SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, renderFormat)));
if (gl::GetDepthBits(internalFormat) > 0 || gl::GetStencilBits(internalFormat) > 0)
{
textureCaps.texturable = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, 0, D3DRTYPE_TEXTURE, renderFormat));
textureCaps.filterable = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, D3DUSAGE_QUERY_FILTER, D3DRTYPE_TEXTURE, renderFormat));
textureCaps.renderable = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, renderFormat)) ||
SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, renderFormat));
}
else
{
D3DFORMAT textureFormat = gl_d3d9::GetTextureFormat(internalFormat);
textureCaps.texturable = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, 0, D3DRTYPE_TEXTURE, textureFormat)) &&
SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, 0, D3DRTYPE_CUBETEXTURE, textureFormat));
textureCaps.filterable = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, D3DUSAGE_QUERY_FILTER, D3DRTYPE_TEXTURE, textureFormat));
textureCaps.renderable = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, textureFormat)) ||
SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, textureFormat));
}
textureCaps.sampleCounts.insert(1);
for (size_t i = D3DMULTISAMPLE_2_SAMPLES; i <= D3DMULTISAMPLE_16_SAMPLES; i++)
......
......@@ -319,7 +319,7 @@ bool ValidateRenderbufferStorageParameters(const gl::Context *context, GLenum ta
}
const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat);
if (!formatCaps.colorRendering && !formatCaps.depthRendering && !formatCaps.stencilRendering)
if (!formatCaps.renderable)
{
return gl::error(GL_INVALID_ENUM, false);
}
......
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