mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-14 16:12:24 -07:00
more texture format coverage in renderer/view-rules
This commit is contained in:
@@ -550,9 +550,15 @@ r_tex2d_alloc(R_Tex2DKind kind, Vec2S32 size, R_Tex2DFormat format, void *data)
|
||||
switch(format)
|
||||
{
|
||||
default:{}break;
|
||||
case R_Tex2DFormat_R8:{dxgi_format = DXGI_FORMAT_R8_UNORM;}break;
|
||||
case R_Tex2DFormat_RGBA8:{}break;
|
||||
case R_Tex2DFormat_BGRA8:{dxgi_format = DXGI_FORMAT_B8G8R8A8_UNORM;}break;
|
||||
case R_Tex2DFormat_R8: {dxgi_format = DXGI_FORMAT_R8_UNORM;}break;
|
||||
case R_Tex2DFormat_RG8: {dxgi_format = DXGI_FORMAT_R8G8_UNORM;}break;
|
||||
case R_Tex2DFormat_RGBA8: {dxgi_format = DXGI_FORMAT_R8G8B8A8_UNORM;}break;
|
||||
case R_Tex2DFormat_BGRA8: {dxgi_format = DXGI_FORMAT_B8G8R8A8_UNORM;}break;
|
||||
case R_Tex2DFormat_R16: {dxgi_format = DXGI_FORMAT_R16_UNORM;}break;
|
||||
case R_Tex2DFormat_RGBA16:{dxgi_format = DXGI_FORMAT_R16G16B16A16_UNORM;}break;
|
||||
case R_Tex2DFormat_R32: {dxgi_format = DXGI_FORMAT_R32_FLOAT;}break;
|
||||
case R_Tex2DFormat_RG32: {dxgi_format = DXGI_FORMAT_R32G32_FLOAT;}break;
|
||||
case R_Tex2DFormat_RGBA32:{dxgi_format = DXGI_FORMAT_R32G32B32A32_FLOAT;}break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,14 @@
|
||||
typedef enum R_Tex2DFormat
|
||||
{
|
||||
R_Tex2DFormat_R8,
|
||||
R_Tex2DFormat_RG8,
|
||||
R_Tex2DFormat_RGBA8,
|
||||
R_Tex2DFormat_BGRA8,
|
||||
R_Tex2DFormat_R16,
|
||||
R_Tex2DFormat_RGBA16,
|
||||
R_Tex2DFormat_R32,
|
||||
R_Tex2DFormat_RG32,
|
||||
R_Tex2DFormat_RGBA32,
|
||||
R_Tex2DFormat_COUNT
|
||||
} R_Tex2DFormat;
|
||||
|
||||
@@ -55,15 +61,27 @@ R_PassKind_COUNT
|
||||
String8 r_tex2d_format_display_string_table[] =
|
||||
{
|
||||
str8_lit_comp("R8"),
|
||||
str8_lit_comp("RG8"),
|
||||
str8_lit_comp("RGBA8"),
|
||||
str8_lit_comp("BGRA8"),
|
||||
str8_lit_comp("R16"),
|
||||
str8_lit_comp("RGBA16"),
|
||||
str8_lit_comp("R32"),
|
||||
str8_lit_comp("RG32"),
|
||||
str8_lit_comp("RGBA32"),
|
||||
};
|
||||
|
||||
U8 r_tex2d_format_bytes_per_pixel_table[] =
|
||||
{
|
||||
1,
|
||||
2,
|
||||
4,
|
||||
4,
|
||||
2,
|
||||
8,
|
||||
4,
|
||||
8,
|
||||
16,
|
||||
};
|
||||
|
||||
String8 r_tex2d_kind_display_string_table[] =
|
||||
|
||||
@@ -8,8 +8,14 @@
|
||||
R_Tex2DFormatTable:
|
||||
{
|
||||
{R8 "R8" 1}
|
||||
{RG8 "RG8" 2}
|
||||
{RGBA8 "RGBA8" 4}
|
||||
{BGRA8 "BGRA8" 4}
|
||||
{R16 "R16" 2}
|
||||
{RGBA16 "RGBA16" 8}
|
||||
{R32 "R32" 4}
|
||||
{RG32 "RG32" 8}
|
||||
{RGBA32 "RGBA32" 16}
|
||||
}
|
||||
|
||||
@table(name, display_string)
|
||||
|
||||
Reference in New Issue
Block a user