Hi Manfred,

I'm lost too. I tried the second way (SimpleMaterial with a TextureChunk and the internal and external parameter as given), but I didn't get the effect I want.

Hummm. For the first solution, it should be updated because between 2 call there is some rendering. In this case, the code MFStateChunkPtr chunk = simpleTextureMaterial->getChunks(); doesn't give any Chunk back. I don't need semitransparent textures so I don't need BlendChunk I think.

Vincent


Manfred Weiler wrote:

On Thu, Feb 17, 2005 at 02:21:13PM +0100, Vincent Honnet wrote:
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.

That is exactly how I would do it. Sorry I am lost here. Someone else
need to comment on that. Maybe you need to call some update function of the Material or the Chunk in order to make the changes effective.
Maybe you also need a BlendChunk for rendering semitransparent objects.

Another possibility is to assemble your material based on ChunkMaterial
and just add the chunks you require: TextureChunk, MaterialChunk etc.
That's how I do it in my implementation.

        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