diff options
author | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-19 15:52:14 +1000 |
---|---|---|
committer | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-19 15:52:14 +1000 |
commit | efb2d293d5e849fc96e4e386d55a7611795561aa (patch) | |
tree | cf4a2054a868ec4757a60c217d64b85413bc5766 /src/ral/backends/opengl/opengl_helpers.h | |
parent | 82515f9d90ac149984013f0d64c1cab37b349b29 (diff) |
clean up texture type handling a little bit
Diffstat (limited to 'src/ral/backends/opengl/opengl_helpers.h')
-rw-r--r-- | src/ral/backends/opengl/opengl_helpers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ral/backends/opengl/opengl_helpers.h b/src/ral/backends/opengl/opengl_helpers.h index f3059ac..f240050 100644 --- a/src/ral/backends/opengl/opengl_helpers.h +++ b/src/ral/backends/opengl/opengl_helpers.h @@ -127,4 +127,15 @@ static u32 shader_create_separate(const char* vert_shader, const char* frag_shad return shader_prog; } +static GLenum opengl_tex_type(GPU_TextureType tex_type) { + switch (tex_type) { + case TEXTURE_TYPE_2D: + return GL_TEXTURE_2D; + case TEXTURE_TYPE_CUBE_MAP: + return GL_TEXTURE_CUBE_MAP; + default: + return GL_TEXTURE_2D; + } +} + #endif |