Hello Manfred,

I have really problems with that... I didn't achieve to get the TextureChunk. Well.... my Code is:

   MFStateChunkPtr chunk = simpleTextureMaterial->getChunks();
for(MFStateChunkPtr::const_iterator i = chunk.begin(); i != chunk.end(); i++)
       {
           if((*i)->getClassType()==TextureChunk::getClassType())
           {
               TextureChunkPtr textChunk = TextureChunkPtr::dcast(*i);
               if(m_bTransparent)
               {
                   textChunk->setInternalFormat(GL_INTENSITY);
                   textChunk->setExternalFormat(GL_LUMINANCE);
               }
           }
       }

Do I the right way ?

Otherwise, I tried to give a TextureChunk to SimpleMaterial with the given internal and external format, but I didn't get transparent textures. I thing I'm doing something the wrong way. I hope you can help me.

Vincent

Manfred Weiler wrote:

Hello Vincent,

I'm sorry, I'm new with OpenSG. How should I get the TextureChunk of my SimpleTexturedMaterial ? Do I the right way with a SimpleTexturedMaterial ?


SimpleTexturedMaterial is derived from ChunkMaterial and among other
chunks it uses a TextureChunk for the texturing. You should be able
to query for the TextureChunk using ChunkMaterial::getChunks and checking each chunk for the type TextureChunk::getClassType().

        Manfred.

======================================================================
Manfred Weiler              [EMAIL PROTECTED]
Visualisierung und Interaktive Systeme          Telefon: 0711/7816-208
Universitaet Stuttgart, IfI                         FAX: 0711/7816-340


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users




--
Vincent Honnet
Photographie und Software Service
Mariahilfstr. 15
52062 Aachen
E-Mail: [EMAIL PROTECTED]
Tel.: 0241 400 8882



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to