From efb2d293d5e849fc96e4e386d55a7611795561aa Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Fri, 19 Jul 2024 15:52:14 +1000 Subject: clean up texture type handling a little bit --- src/ral/backends/opengl/opengl_helpers.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ral/backends/opengl/opengl_helpers.h') 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 -- cgit v1.2.3-70-g09d2