GPUTexture: Add support for GL_R16 texture format
This commit is contained in:
@@ -36,6 +36,7 @@ static bool drw_texture_format_supports_framebuffer(GPUTextureFormat format)
|
||||
case GPU_R16F:
|
||||
case GPU_R16I:
|
||||
case GPU_R16UI:
|
||||
case GPU_R16:
|
||||
case GPU_R32F:
|
||||
case GPU_R32UI:
|
||||
case GPU_RG8:
|
||||
|
||||
@@ -324,6 +324,7 @@ static uint gpu_get_bytesize(GPUTextureFormat data_type)
|
||||
case GPU_R16UI:
|
||||
case GPU_R16I:
|
||||
case GPU_RG8:
|
||||
case GPU_R16:
|
||||
return 2;
|
||||
case GPU_R8:
|
||||
return 1;
|
||||
@@ -357,6 +358,7 @@ static GLenum gpu_get_gl_internalformat(GPUTextureFormat format)
|
||||
case GPU_R16UI: return GL_R16UI;
|
||||
case GPU_RG8: return GL_RG8;
|
||||
case GPU_RG16UI: return GL_RG16UI;
|
||||
case GPU_R16: return GL_R16;
|
||||
case GPU_R8: return GL_R8;
|
||||
/* Special formats texture & renderbuffer */
|
||||
case GPU_R11F_G11F_B10F: return GL_R11F_G11F_B10F;
|
||||
|
||||
Reference in New Issue
Block a user