summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-02-19 23:56:33 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-02-19 23:56:33 +0000
commit8c0313e9cc384d142ac9f28fcdf55e44211f6966 (patch)
treecb583ddd9abfa6980a2c4e280a9554f96396c5d5 /Graphics/GraphicsEngineOpenGL
parentUpdated StringPool (diff)
downloadDiligentCore-8c0313e9cc384d142ac9f28fcdf55e44211f6966.tar.gz
DiligentCore-8c0313e9cc384d142ac9f28fcdf55e44211f6966.zip
Added GL_HALF_FLOAT type
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp b/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp
index 0608dd39..fa8e8daa 100644
--- a/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp
+++ b/Graphics/GraphicsEngineOpenGL/include/GLTypeConversions.hpp
@@ -73,7 +73,7 @@ static const GLenum TypeToGLTypeMap[] =
GL_UNSIGNED_BYTE, //VT_UINT8
GL_UNSIGNED_SHORT, //VT_UINT16
GL_UNSIGNED_INT, //VT_UINT32
- 0, //VT_FLOAT16
+ GL_HALF_FLOAT, //VT_FLOAT16
GL_FLOAT //VT_FLOAT32
};
// clang-format on
@@ -92,6 +92,7 @@ inline GLenum TypeToGLType(VALUE_TYPE Value)
case VT_UINT8: VERIFY_EXPR(GLType == GL_UNSIGNED_BYTE); break;
case VT_UINT16: VERIFY_EXPR(GLType == GL_UNSIGNED_SHORT); break;
case VT_UINT32: VERIFY_EXPR(GLType == GL_UNSIGNED_INT); break;
+ case VT_FLOAT16: VERIFY_EXPR(GLType == GL_HALF_FLOAT); break;
case VT_FLOAT32: VERIFY_EXPR(GLType == GL_FLOAT); break;
default: UNEXPECTED("Unexpected value type");
// clang-format on