Skip to content

Commit

Permalink
Add PFG_RGBA16_UINT to the PixelFormat enum
Browse files Browse the repository at this point in the history
To be used in the following commit.
  • Loading branch information
nchery-intel committed Oct 4, 2022
1 parent 2284bd6 commit 4d32a7a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/betsy/EncoderGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace betsy
{
PFG_RGBA32_UINT,
PFG_RGBA32_FLOAT,
PFG_RGBA16_UINT,
PFG_RGBA16_FLOAT,
PFG_R32_FLOAT,
PFG_RG32_UINT,
Expand Down
1 change: 1 addition & 0 deletions src/betsy/CpuImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ namespace betsy
case PFG_RGBA32_UINT:
case PFG_RGBA32_FLOAT:
return 4u * 4u;
case PFG_RGBA16_UINT:
case PFG_RGBA16_FLOAT:
return 2u * 4u;
case PFG_R32_FLOAT:
Expand Down
7 changes: 7 additions & 0 deletions src/betsy/EncoderGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ namespace betsy
return GL_RGBA32UI;
case PFG_RGBA32_FLOAT:
return GL_RGBA32F;
case PFG_RGBA16_UINT:
return GL_RGBA16UI;
case PFG_RGBA16_FLOAT:
return GL_RGBA16F;
case PFG_R32_FLOAT:
Expand Down Expand Up @@ -104,6 +106,7 @@ namespace betsy
{
case PFG_RGBA32_UINT:
case PFG_RGBA32_FLOAT:
case PFG_RGBA16_UINT:
case PFG_RGBA16_FLOAT:
case PFG_RGBA8_UNORM:
case PFG_RGBA8_UNORM_SRGB:
Expand Down Expand Up @@ -134,6 +137,7 @@ namespace betsy
switch( pixelFormat )
{
case PFG_RGBA32_UINT:
case PFG_RGBA16_UINT:
format = GL_RGBA_INTEGER;
break;
case PFG_R32_FLOAT:
Expand Down Expand Up @@ -180,6 +184,9 @@ namespace betsy
case PFG_RG32_UINT:
type = GL_UNSIGNED_INT;
break;
case PFG_RGBA16_UINT:
type = GL_UNSIGNED_SHORT;
break;
case PFG_RGBA8_UNORM:
case PFG_RGBA8_UNORM_SRGB:
type = GL_UNSIGNED_INT_8_8_8_8_REV;
Expand Down

0 comments on commit 4d32a7a

Please sign in to comment.