@@ -14,6 +14,7 @@ namespace nbl
14
14
namespace video
15
15
{
16
16
17
+ // @Crisspl these switches are woefully incomplete on all 3 functions
17
18
inline GLenum getSizedOpenGLFormatFromOurFormat (asset::E_FORMAT format)
18
19
{
19
20
using namespace asset ;
@@ -354,6 +355,7 @@ inline GLenum getSizedOpenGLFormatFromOurFormat(asset::E_FORMAT format)
354
355
return GL_INVALID_ENUM;
355
356
}
356
357
358
+ #if 0
357
359
inline asset::E_FORMAT getOurFormatFromSizedOpenGLFormat(GLenum sizedFormat)
358
360
{
359
361
using namespace asset;
@@ -692,8 +694,8 @@ inline asset::E_FORMAT getOurFormatFromSizedOpenGLFormat(GLenum sizedFormat)
692
694
}
693
695
return asset::EF_UNKNOWN;
694
696
}
695
-
696
- // TODO:
697
+ # endif
698
+ // TODO: all enums
697
699
static GLenum formatEnumToGLenum (asset::E_FORMAT fmt)
698
700
{
699
701
using namespace asset ;
@@ -796,7 +798,6 @@ static GLenum formatEnumToGLenum(asset::E_FORMAT fmt)
796
798
}
797
799
798
800
799
-
800
801
// ! Get opengl values for the GPU texture storage
801
802
inline void getOpenGLFormatAndParametersFromColorFormat (asset::E_FORMAT format, GLenum& colorformat, GLenum& type)
802
803
{
@@ -805,8 +806,21 @@ inline void getOpenGLFormatAndParametersFromColorFormat(asset::E_FORMAT format,
805
806
colorformat = GL_INVALID_ENUM;
806
807
type = GL_INVALID_ENUM;
807
808
809
+ // TODO: make the switch go in the same order as the enum decls
808
810
switch (format)
809
811
{
812
+ case EF_A2R10G10B10_UNORM_PACK32: // no idea if I did this one correctly
813
+ colorformat = GL_BGRA;
814
+ type = GL_UNSIGNED_INT_10_10_10_2;
815
+ break ;
816
+ case EF_A2B10G10R10_UNORM_PACK32:
817
+ colorformat = GL_RGBA;
818
+ type = GL_UNSIGNED_INT_2_10_10_10_REV;
819
+ break ;
820
+ case EF_A2B10G10R10_UINT_PACK32:
821
+ colorformat = GL_RGBA_INTEGER;
822
+ type = GL_UNSIGNED_INT_2_10_10_10_REV;
823
+ break ;
810
824
case asset::EF_A1R5G5B5_UNORM_PACK16:
811
825
colorformat = GL_BGRA_EXT;
812
826
type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
0 commit comments