Hello Mauro, Mauro wrote: > I'm developing an application that let the user insert or remove texture > chunks from the material. > When I want to remove a chunk I use the code: > chunkMaterial->subChunk(textureChunk_n, n); > > Problems come out when I add a shader. > If a texture is linked as a uniform variable to the shader program, when I > remove the texture's chunk, nothing changes in the scene apparently. The > shader still reaches the texture.
are you saying your shader accesses a texture unit that has no texture bound to it? - let's say you add two textures to your material (chunks 0, 1) and set two uniforms to 0, 1 respectively to access the texture units and then remove the texture chunk from slot 1. If that is the case it depends on the rest of your scene what you will see, the hardware will usually just access whatever texture was last bound to texture unit 1 and if the rest of your scene does not make use of that texture unit it may look as if nothing happened. > Am I missing something or is it a possible bug? i'm not sure, does the above describe what you are doing or did i misunderstand your description? Can you try removing the uniform that references the removed texture or set it to access a still bound texture (e.g. change it from texture unit 1 to texture unit 0)? Cheers, Carsten ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users