diff options
author | LaG1924 <lag1924@gmail.com> | 2021-12-04 20:51:39 +0100 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-12-04 20:56:29 +0100 |
commit | 3f122e57f118db1229a4bad2c54be624f2f8f19c (patch) | |
tree | 538ec737720cc8e344cbcfed1edcedff0d23a109 /src/GalOgl.cpp | |
parent | Added gamma correction (diff) | |
download | AltCraft-3f122e57f118db1229a4bad2c54be624f2f8f19c.tar AltCraft-3f122e57f118db1229a4bad2c54be624f2f8f19c.tar.gz AltCraft-3f122e57f118db1229a4bad2c54be624f2f8f19c.tar.bz2 AltCraft-3f122e57f118db1229a4bad2c54be624f2f8f19c.tar.lz AltCraft-3f122e57f118db1229a4bad2c54be624f2f8f19c.tar.xz AltCraft-3f122e57f118db1229a4bad2c54be624f2f8f19c.tar.zst AltCraft-3f122e57f118db1229a4bad2c54be624f2f8f19c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/GalOgl.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/GalOgl.cpp b/src/GalOgl.cpp index ff43ed8..c7344fe 100644 --- a/src/GalOgl.cpp +++ b/src/GalOgl.cpp @@ -311,10 +311,14 @@ GLenum GalTypeGetComponentGlType(Gal::Type type) { size_t GalFormatGetSize(Format format) { switch (format) { + case Format::D24S8: + return 4; case Format::R8G8B8: return 3; case Format::R8G8B8A8: return 4; + case Format::R32G32B32A32F: + return 16; default: return 0; } @@ -329,6 +333,8 @@ GLenum GalFormatGetGlLinearInternalFormat(Format format) { return GL_RGB8; case Format::R8G8B8A8: return GL_RGBA8; + case Format::R32G32B32A32F: + return GL_RGBA32F; default: return 0; } @@ -338,11 +344,13 @@ GLenum GalFormatGetGlLinearInternalFormat(Format format) { GLenum GalFormatGetGlInternalFormat(Format format) { switch (format) { case Format::D24S8: - return GL_DEPTH24_STENCIL8; + return 0; case Format::R8G8B8: return GL_SRGB; case Format::R8G8B8A8: return GL_SRGB_ALPHA; + case Format::R32G32B32A32F: + return 0; default: return 0; } @@ -357,6 +365,8 @@ GLenum GalFormatGetGlFormat(Format format) { return GL_RGB; case Format::R8G8B8A8: return GL_RGBA; + case Format::R32G32B32A32F: + return GL_RGBA; default: return 0; } @@ -371,6 +381,8 @@ GLenum GalFormatGetGlType(Format format) { return GL_UNSIGNED_BYTE; case Format::R8G8B8A8: return GL_UNSIGNED_BYTE; + case Format::R32G32B32A32F: + return GL_FLOAT; default: return 0; } |