Explorar o código

use constant from gl context if available

Alexander Rose %!s(int64=4) %!d(string=hai) anos
pai
achega
3173396737
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/mol-gl/webgl/texture.ts

+ 1 - 1
src/mol-gl/webgl/texture.ts

@@ -408,7 +408,7 @@ export function loadImageTexture(src: string, cell: ValueCell<Texture>, texture:
 //
 
 export function createNullTexture(gl?: GLRenderingContext): Texture {
-    const target = 3553;
+    const target = gl?.TEXTURE_2D ?? 3553;
     return {
         id: getNextTextureId(),
         target,