260 case TextureFormat::UNORM_8_8_8_8:
261 case TextureFormat::SFLOAT_32_32_32_32:
262 case TextureFormat::SFLOAT_16_16_16_16:
263 case TextureFormat::UNORM_16_16_16_16:
265 case TextureFormat::UINT_8_8_8_8:
266 case TextureFormat::SINT_8_8_8_8:
267 case TextureFormat::SINT_32_32_32_32:
268 case TextureFormat::UINT_32_32_32_32:
269 case TextureFormat::UINT_16_16_16_16:
270 case TextureFormat::SINT_16_16_16_16:
271 return GL_RGBA_INTEGER;
272 case TextureFormat::UNORM_8_8:
273 case TextureFormat::SFLOAT_32_32:
274 case TextureFormat::SFLOAT_16_16:
275 case TextureFormat::UNORM_16_16:
277 case TextureFormat::UINT_8_8:
278 case TextureFormat::SINT_8_8:
279 case TextureFormat::UINT_32_32:
280 case TextureFormat::SINT_32_32:
281 case TextureFormat::SINT_16_16:
282 case TextureFormat::UINT_16_16:
283 return GL_RG_INTEGER;
284 case TextureFormat::UNORM_8:
285 case TextureFormat::SFLOAT_32:
286 case TextureFormat::SFLOAT_16:
287 case TextureFormat::UNORM_16:
289 case TextureFormat::UINT_8:
290 case TextureFormat::SINT_8:
291 case TextureFormat::UINT_32:
292 case TextureFormat::SINT_32:
293 case TextureFormat::UINT_16:
294 case TextureFormat::SINT_16:
295 return GL_RED_INTEGER;
297 case TextureFormat::UINT_10_10_10_2:
298 case TextureFormat::UNORM_10_10_10_2:
299 case TextureFormat::SRGBA_8_8_8_8:
301 case TextureFormat::UFLOAT_11_11_10:
303 case TextureFormat::SFLOAT_32_DEPTH_UINT_8:
304 return GL_DEPTH_STENCIL;
306 case TextureFormat::SNORM_16_16_16_16:
307 case TextureFormat::SNORM_8_8_8_8:
309 case TextureFormat::SFLOAT_16_16_16:
310 case TextureFormat::SFLOAT_32_32_32:
311 case TextureFormat::SINT_32_32_32:
312 case TextureFormat::UINT_32_32_32:
313 case TextureFormat::SNORM_16_16_16:
314 case TextureFormat::SINT_16_16_16:
315 case TextureFormat::UINT_16_16_16:
316 case TextureFormat::UNORM_16_16_16:
317 case TextureFormat::SNORM_8_8_8:
318 case TextureFormat::UNORM_8_8_8:
319 case TextureFormat::SINT_8_8_8:
320 case TextureFormat::UINT_8_8_8:
322 case TextureFormat::SNORM_16_16:
323 case TextureFormat::SNORM_8_8:
325 case TextureFormat::SNORM_16:
326 case TextureFormat::SNORM_8:
329 case TextureFormat::SRGB_DXT1:
330 return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
331 case TextureFormat::SRGB_DXT3:
332 return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
333 case TextureFormat::SRGB_DXT5:
334 return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
335 case TextureFormat::SNORM_DXT1:
336 return GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
337 case TextureFormat::SNORM_DXT3:
338 return GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
339 case TextureFormat::SNORM_DXT5:
340 return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
341 case TextureFormat::SRGBA_8_8_8:
342 case TextureFormat::UFLOAT_9_9_9_EXP_5:
345 case TextureFormat::SFLOAT_32_DEPTH:
346 case TextureFormat::UNORM_16_DEPTH:
347 return GL_DEPTH_COMPONENT;
#define GPU_TEXTURE_FORMAT_EXPAND(impl)
#define GPU_SAMPLER_CUSTOM_TYPES_COUNT
#define GPU_SAMPLER_EXTEND_MODES_COUNT
GLTexture(const char *name)
void update_sub(int mip, int offset[3], int extent[3], eGPUDataFormat type, const void *data, const uint unpack_row_length=0) override
void read(int mip, eGPUDataFormat type, void *data) override
static GLuint get_sampler(const GPUSamplerState &sampler_state)
void clear(const double4 data) override
void copy_to(Texture *dst, IndexRange mip_levels) override
void swizzle_set(const char swizzle_mask[4]) override
Texture(const char *name)