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
Post a Comment