opengl - Using multiple textures for shader programming in Haskell -


i'm using textureobjects when reading in texture. read in 2 textures, , want dynamically switch between them, when try do:

tunit =(\(textureobject x) -> x) texobj 

and

activetexture $= (textureunit tunit) setuniform p "texunit" (textureunit tunit) 

it doesn't work, if replace tunit 0, works it'll draw last texture load.

i'm using glutil's readtexture function load in texture.

any thoughts?

the textureunit local shader id , textureobject global texture id. wasn't binding textureobject again before setting active texture, using latest 1 bound.


Comments

Popular posts from this blog

angularjs - Showing an empty as first option in select tag -

qt - Change color of QGraphicsView rubber band -

c++ - Visible files in the "Projects" View of the Qt Creator IDE if using the CMake build system -