summaryrefslogtreecommitdiffstats
path: root/src/GalOgl.cpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-12-11 18:11:31 +0100
committerLaG1924 <lag1924@gmail.com>2021-12-11 18:11:31 +0100
commit9202a3cab793a239a084414e4dddc7759f479fc2 (patch)
tree8e19c4f8d3d4ebfb0cd8ba8b80efb887707e24b0 /src/GalOgl.cpp
parentMore optimization to GBuffer size (diff)
downloadAltCraft-9202a3cab793a239a084414e4dddc7759f479fc2.tar
AltCraft-9202a3cab793a239a084414e4dddc7759f479fc2.tar.gz
AltCraft-9202a3cab793a239a084414e4dddc7759f479fc2.tar.bz2
AltCraft-9202a3cab793a239a084414e4dddc7759f479fc2.tar.lz
AltCraft-9202a3cab793a239a084414e4dddc7759f479fc2.tar.xz
AltCraft-9202a3cab793a239a084414e4dddc7759f479fc2.tar.zst
AltCraft-9202a3cab793a239a084414e4dddc7759f479fc2.zip
Diffstat (limited to '')
-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: