gl: Add readback/writeback config for format GL_R16

This commit is contained in:
kd-11 2019-07-08 20:49:50 +03:00 committed by kd-11
parent c072c511a1
commit 956270d9be
2 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <exception>
#include <string>
@ -1443,6 +1443,7 @@ namespace gl
rgba8 = GL_RGBA8,
r5g6b5 = GL_RGB565,
r8 = GL_R8,
r16 = GL_R16,
r32f = GL_R32F,
rg8 = GL_RG8,
rg16 = GL_RG16,

View File

@ -100,6 +100,8 @@ namespace gl
return std::make_tuple(GL_RGBA, GL_UNSIGNED_BYTE, false);
case texture::internal_format::r8:
return std::make_tuple(GL_RED, GL_UNSIGNED_BYTE, false);
case texture::internal_format::r16:
return std::make_tuple(GL_RED, GL_UNSIGNED_SHORT, true);
case texture::internal_format::r32f:
return std::make_tuple(GL_RED, GL_FLOAT, true);
case texture::internal_format::r5g6b5: