summaryrefslogtreecommitdiffstats
path: root/src/GalOgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GalOgl.cpp')
-rw-r--r--src/GalOgl.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/GalOgl.cpp b/src/GalOgl.cpp
index 94c2146..b046d4b 100644
--- a/src/GalOgl.cpp
+++ b/src/GalOgl.cpp
@@ -358,8 +358,14 @@ size_t GalFormatGetSize(Format format) {
switch (format) {
case Format::D24S8:
return 4;
+ case Format::R8:
+ return 1;
+ case Format::R8G8:
+ return 2;
case Format::R8G8B8:
return 3;
+ case Format::R8G8B8SN:
+ return 3;
case Format::R8G8B8A8:
return 4;
case Format::R32G32B32A32F:
@@ -374,8 +380,14 @@ GLenum GalFormatGetGlLinearInternalFormat(Format format) {
switch (format) {
case Format::D24S8:
return GL_DEPTH24_STENCIL8;
+ case Format::R8:
+ return GL_R8;
+ case Format::R8G8:
+ return GL_RG8;
case Format::R8G8B8:
return GL_RGB8;
+ case Format::R8G8B8SN:
+ return GL_RGB8_SNORM;
case Format::R8G8B8A8:
return GL_RGBA8;
case Format::R32G32B32A32F:
@@ -390,8 +402,14 @@ GLenum GalFormatGetGlInternalFormat(Format format) {
switch (format) {
case Format::D24S8:
return 0;
+ case Format::R8:
+ return 0;
+ case Format::R8G8:
+ return 0;
case Format::R8G8B8:
return GL_SRGB;
+ case Format::R8G8B8SN:
+ return 0;
case Format::R8G8B8A8:
return GL_SRGB_ALPHA;
case Format::R32G32B32A32F:
@@ -406,8 +424,14 @@ GLenum GalFormatGetGlFormat(Format format) {
switch (format) {
case Format::D24S8:
return GL_DEPTH_STENCIL;
+ case Format::R8:
+ return GL_RED;
+ case Format::R8G8:
+ return GL_RG;
case Format::R8G8B8:
return GL_RGB;
+ case Format::R8G8B8SN:
+ return GL_RGB;
case Format::R8G8B8A8:
return GL_RGBA;
case Format::R32G32B32A32F:
@@ -422,8 +446,14 @@ GLenum GalFormatGetGlType(Format format) {
switch (format) {
case Format::D24S8:
return GL_UNSIGNED_INT_24_8;
+ case Format::R8:
+ return GL_UNSIGNED_BYTE;
+ case Format::R8G8:
+ return GL_UNSIGNED_BYTE;
case Format::R8G8B8:
return GL_UNSIGNED_BYTE;
+ case Format::R8G8B8SN:
+ return GL_BYTE;
case Format::R8G8B8A8:
return GL_UNSIGNED_BYTE;
case Format::R32G32B32A32F: