From d5a61d37059b11afa5dd2af7faba81d26e3dca48 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 6 Jul 2014 09:42:19 +0000 Subject: [PATCH] Accept integer samplers --- panda/src/glstuff/glShaderContext_src.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 54ea96f726..dd8042701b 100755 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -459,6 +459,8 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext if (param_size == 1) { switch (param_type) { #ifndef OPENGLES + case GL_INT_SAMPLER_1D: + case GL_UNSIGNED_INT_SAMPLER_1D: case GL_SAMPLER_1D_SHADOW: case GL_SAMPLER_1D: { Shader::ShaderTexSpec bind; @@ -468,6 +470,8 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext bind._stage = texunitno++; s->_tex_spec.push_back(bind); continue; } + case GL_INT_SAMPLER_2D: + case GL_UNSIGNED_INT_SAMPLER_2D: case GL_SAMPLER_2D_SHADOW: #endif case GL_SAMPLER_2D: { @@ -478,6 +482,10 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext bind._stage = texunitno++; s->_tex_spec.push_back(bind); continue; } +#ifndef OPENGLES + case GL_INT_SAMPLER_3D: + case GL_UNSIGNED_INT_SAMPLER_3D: +#endif case GL_SAMPLER_3D: { Shader::ShaderTexSpec bind; bind._id = arg_id; @@ -486,6 +494,11 @@ CLP(ShaderContext)(CLP(GraphicsStateGuardian) *glgsg, Shader *s) : ShaderContext bind._stage = texunitno++; s->_tex_spec.push_back(bind); continue; } +#ifndef OPENGLES + case GL_INT_SAMPLER_CUBE: + case GL_UNSIGNED_INT_SAMPLER_CUBE: + case GL_SAMPLER_CUBE_SHADOW: +#endif case GL_SAMPLER_CUBE: { Shader::ShaderTexSpec bind; bind._id = arg_id;