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

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

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

php - Cloud9 cloud IDE and CakePHP -