From 1a9a42bcdac2404c87035c00267f5bac2bb5fa4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 22 Jul 2017 21:03:29 -0700 Subject: [PATCH] Fixed texture validation. --- src/bgfx.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 27a65cafd..db11654a4 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -3147,6 +3147,13 @@ error: srgbCaps = BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB; } + if (0 != (_flags & BGFX_TEXTURE_RT_MASK) ) + { + formatSupported = (g_caps.formats[_format] & (0 + | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER + ) ); + } + if (!formatSupported) { _err->setError(BGFX_ERROR_TEXTURE_VALIDATION