@kibeo/loaders.gl-textures
Version:
Framework-independent loaders for compressed and super compressed (basis) textures
82 lines (78 loc) • 4.13 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mapVkFormatToWebGL = mapVkFormatToWebGL;
var _glConstants = require("../gl-constants");
var VULKAN_TO_WEBGL_FORMAT_MAP = {
131: _glConstants.GL.COMPRESSED_RGB_S3TC_DXT1_EXT,
132: _glConstants.GL.COMPRESSED_SRGB_S3TC_DXT1_EXT,
133: _glConstants.GL.COMPRESSED_RGBA_S3TC_DXT1_EXT,
134: _glConstants.GL.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
135: _glConstants.GL.COMPRESSED_RGBA_S3TC_DXT3_EXT,
136: _glConstants.GL.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
137: _glConstants.GL.COMPRESSED_RGBA_S3TC_DXT5_EXT,
138: _glConstants.GL.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,
139: _glConstants.GL.COMPRESSED_RED_RGTC1_EXT,
140: _glConstants.GL.COMPRESSED_SIGNED_RED_RGTC1_EXT,
141: _glConstants.GL.COMPRESSED_RED_GREEN_RGTC2_EXT,
142: _glConstants.GL.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,
147: _glConstants.GL.COMPRESSED_RGB8_ETC2,
148: _glConstants.GL.COMPRESSED_SRGB8_ETC2,
149: _glConstants.GL.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
150: _glConstants.GL.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
151: _glConstants.GL.COMPRESSED_RGBA8_ETC2_EAC,
152: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
153: _glConstants.GL.COMPRESSED_R11_EAC,
154: _glConstants.GL.COMPRESSED_SIGNED_R11_EAC,
155: _glConstants.GL.COMPRESSED_RG11_EAC,
156: _glConstants.GL.COMPRESSED_SIGNED_RG11_EAC,
157: _glConstants.GL.COMPRESSED_RGBA_ASTC_4x4_KHR,
158: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
159: _glConstants.GL.COMPRESSED_RGBA_ASTC_5x4_KHR,
160: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,
161: _glConstants.GL.COMPRESSED_RGBA_ASTC_5x5_KHR,
162: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
163: _glConstants.GL.COMPRESSED_RGBA_ASTC_6x5_KHR,
164: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
165: _glConstants.GL.COMPRESSED_RGBA_ASTC_6x6_KHR,
166: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
167: _glConstants.GL.COMPRESSED_RGBA_ASTC_8x5_KHR,
168: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
169: _glConstants.GL.COMPRESSED_RGBA_ASTC_8x6_KHR,
170: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
171: _glConstants.GL.COMPRESSED_RGBA_ASTC_8x8_KHR,
172: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
173: _glConstants.GL.COMPRESSED_RGBA_ASTC_10x5_KHR,
174: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
175: _glConstants.GL.COMPRESSED_RGBA_ASTC_10x6_KHR,
176: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
177: _glConstants.GL.COMPRESSED_RGBA_ASTC_10x8_KHR,
178: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
179: _glConstants.GL.COMPRESSED_RGBA_ASTC_10x10_KHR,
180: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
181: _glConstants.GL.COMPRESSED_RGBA_ASTC_12x10_KHR,
182: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
183: _glConstants.GL.COMPRESSED_RGBA_ASTC_12x12_KHR,
184: _glConstants.GL.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,
1000054000: _glConstants.GL.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,
1000054001: _glConstants.GL.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,
1000066000: _glConstants.GL.COMPRESSED_RGBA_ASTC_4x4_KHR,
1000066001: _glConstants.GL.COMPRESSED_RGBA_ASTC_5x4_KHR,
1000066002: _glConstants.GL.COMPRESSED_RGBA_ASTC_5x5_KHR,
1000066003: _glConstants.GL.COMPRESSED_RGBA_ASTC_6x5_KHR,
1000066004: _glConstants.GL.COMPRESSED_RGBA_ASTC_6x6_KHR,
1000066005: _glConstants.GL.COMPRESSED_RGBA_ASTC_8x5_KHR,
1000066006: _glConstants.GL.COMPRESSED_RGBA_ASTC_8x6_KHR,
1000066007: _glConstants.GL.COMPRESSED_RGBA_ASTC_8x8_KHR,
1000066008: _glConstants.GL.COMPRESSED_RGBA_ASTC_10x5_KHR,
1000066009: _glConstants.GL.COMPRESSED_RGBA_ASTC_10x6_KHR,
1000066010: _glConstants.GL.COMPRESSED_RGBA_ASTC_10x8_KHR,
1000066011: _glConstants.GL.COMPRESSED_RGBA_ASTC_10x10_KHR,
1000066012: _glConstants.GL.COMPRESSED_RGBA_ASTC_12x10_KHR,
1000066013: _glConstants.GL.COMPRESSED_RGBA_ASTC_12x12_KHR
};
function mapVkFormatToWebGL(vkFormat) {
return VULKAN_TO_WEBGL_FORMAT_MAP[vkFormat];
}
//# sourceMappingURL=ktx-format-helper.js.map