diff --git a/__init__.py b/__init__.py index f14bb8f..2e64991 100644 --- a/__init__.py +++ b/__init__.py @@ -433,8 +433,7 @@ select_texture = _engine.rk_select_texture select_texture.restype = None select_texture.argtypes = ( ctypes.c_uint, # slot - ctypes.c_void_p, # texture - ctypes.c_void_p) # sampler + ctypes.c_void_p) # texture draw_triangles = _engine.rk_draw_triangles draw_triangles.restype = None diff --git a/cpp/render.hpp b/cpp/render.hpp index 209c1e4..9ee9d71 100644 --- a/cpp/render.hpp +++ b/cpp/render.hpp @@ -155,8 +155,7 @@ RK_EXPORT void rk_set_param_mat3( RK_EXPORT void rk_select_texture( rk_uint slot, - rk_texture_t texture, - rk_input_t sampler); + rk_texture_t texture); RK_EXPORT void rk_draw_triangles( rk_triangles_t triangles); diff --git a/cpp/render/render_opengles.cpp b/cpp/render/render_opengles.cpp index 2163677..c71b907 100644 --- a/cpp/render/render_opengles.cpp +++ b/cpp/render/render_opengles.cpp @@ -746,18 +746,15 @@ void rk_set_param_mat3( void rk_select_texture( rk_uint slot, - rk_texture_t _texture, - rk_input_t _sampler) { + rk_texture_t _texture) { rk_texture const * const texture = reinterpret_cast(_texture); - GLint const sampler = reinterpret_cast(_sampler) - 1; - if (texture && sampler > -1) { + if (texture) { glActiveTexture(GL_TEXTURE0 + slot); if (texture->nlevels) { glBindTexture(GL_TEXTURE_2D_ARRAY, texture->texture); } else { glBindTexture(GL_TEXTURE_2D, texture->texture); } - glUniform1i(sampler, slot); } }