Jelajahi Sumber

Fix texture validation logic (#2509)

* fix mip level computation for asmjs and add support for srgb textures in es2/webgl

* fix BX_TRACE in glcontext_html5.cpp

* fix wrong logic in texture validation

Co-authored-by: Sebastian Marketsmueller <[email protected]>
Co-authored-by: Vladimir Vukicevic <[email protected]>
Sebastian Marketsmueller 4 tahun lalu
induk
melakukan
582dfc1e4c
2 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 1
      src/bgfx.cpp
  2. 0 1
      src/glcontext_html5.cpp

+ 1 - 1
src/bgfx.cpp

@@ -4517,7 +4517,7 @@ namespace bgfx
 			);
 
 		BGFX_ERROR_CHECK(false
-			|| is3DTexture
+			|| !is3DTexture
 			|| 0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D)
 			, _err
 			, BGFX_ERROR_TEXTURE_VALIDATION

+ 0 - 1
src/glcontext_html5.cpp

@@ -140,7 +140,6 @@ namespace bgfx { namespace gl
 			}
 			error = (int) context;
 		}
-
 		BX_TRACE("Failed to create WebGL context. (Canvas handle: '%s', last attempt error %d)", canvas, error);
 		return NULL;
 	}