Hi,

Thanks for the hint with the textureChunk finding, it works great. I have a
question though : I set my texture on a slot by calling
ChunkMaterial::addChunk, which takes the texture chunk ptr as first parameter.
When I do that, am I sure that if it's the first time I call addChunk with a
TextureChunk on this materialchunk, the texturechunk will be assigned the slot
number 0? If I call a second time addChunk on the same materialChunk with
another texturechunk, will the slot number be 1? etc.
What about the second parameter of the addChunk function : is it a good way to
provide our own texture slot number? Like that, I would call addChunk(texChunk,
slotNumber), and I will be sure that this texture chunk will be assigned this
slotNumber, instead of counting the times we've called addChunk on this
material before. Does it work like that?

Anyway, I tried with the debug libs and it doesn't seem I have any OpenGL error.
Still, I'm not sure about what you call "texture definition" : I generate
myself the data of the texture, by feeding the data pointer of the image
pointer (which I get by calling getData() on the Image) with UChar8 triplets.
And I use the format "OSG_RGB_PF" :
img->set( Image::OSG_RGB_PF, _iBar, _jBar, _kBar, 1, 1, 0);
Is it related to what you call texture definitions?
Just to know what to look for, because my log file is awfully enormous, what
kind of messages would I get with such an OpenGL?

Thanks for help

Jonathan

Selon Dirk Reiners <[EMAIL PROTECTED]>:

>
>       Hi Jonathan,
>
> just a quick precheck answer. Your code seems to be ok, just want to
> confirm one detail: you're using volume textures, right?
>
> I can think of two possible reasons for your behavior. Does the texture
> definition work? I.e. when running with debug libs, do you get no
> messages on the console about OpenGL errors? The other would be a bug in
> OpenSG, we can never totally rule that out, but I don't expect it.
>
> BTW, you can simplify your Chunk search code, the ChunkMaterial has
> something very similar built in:
>
> StateChunkPtr stateChunk = pM->find(TextureChunk::getClassType(), 0);
>
> to find the TextureChunk for slot 0.
>
> Yours
>
>       Dirk
>
> --
> Dirk Reiners <[EMAIL PROTECTED]>
>
>
>
> -------------------------------------------------------
> 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
>




-------------------------------------------------------
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