Hi all,
in this context I've added some (for our purposes) useful functions to ChunkMaterial and Shader source. Find attached my changes.
Best regards,
Michael
Gesendet: Mittwoch, 23. April 2014 um 18:32 Uhr
Von: "Carsten Neumann" <carsten.p.neum...@gmail.com>
An: opensg-users@lists.sourceforge.net
Cc: carsten.p.neum...@googlemail.com
Betreff: Re: [Opensg-users] OpenSG 2: State Handling
Von: "Carsten Neumann" <carsten.p.neum...@gmail.com>
An: opensg-users@lists.sourceforge.net
Cc: carsten.p.neum...@googlemail.com
Betreff: Re: [Opensg-users] OpenSG 2: State Handling
Hello Michael,
On 2014-04-23 17:01, Michael Raab wrote:
> we need to port some places where TextureChunks in 1.8 were assigned to
> a special slot. How can I assign a TextureEnvChunk to a TextureObjChunk
> that is bound to certain slot? Assign the same slot id to both?
yes, assign the same slot id to both.
> Looking at the code I found some places were it was written that chunks
> with same slot id may override each other...
Only if they are of the same type (or more precisely if they use the
same StateChunkClass, see below).
> Could someone please
> highlight the internal Chunk/State handling in short?
The different kinds of chunks have a StateChunkClass member that
determines how many slots are assigned to that particular type of chunk.
Many chunks only get one slot, because they control a specific piece of
state that only exists once per context. For textures the situation is
different since you can have multiple bound at once, so the
TextureObjChunk gets multiple slots. The TextureEnvChunk has the same
number of slots, but they two sets are still distinct, so you can bind a
TextureObjChunk to slot N and a TextureEnvChunk to slot N and they
affect both the same texture unit N.
Cheers,
Carsten
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users
On 2014-04-23 17:01, Michael Raab wrote:
> we need to port some places where TextureChunks in 1.8 were assigned to
> a special slot. How can I assign a TextureEnvChunk to a TextureObjChunk
> that is bound to certain slot? Assign the same slot id to both?
yes, assign the same slot id to both.
> Looking at the code I found some places were it was written that chunks
> with same slot id may override each other...
Only if they are of the same type (or more precisely if they use the
same StateChunkClass, see below).
> Could someone please
> highlight the internal Chunk/State handling in short?
The different kinds of chunks have a StateChunkClass member that
determines how many slots are assigned to that particular type of chunk.
Many chunks only get one slot, because they control a specific piece of
state that only exists once per context. For textures the situation is
different since you can have multiple bound at once, so the
TextureObjChunk gets multiple slots. The TextureEnvChunk has the same
number of slots, but they two sets are still distinct, so you can bind a
TextureObjChunk to slot N and a TextureEnvChunk to slot N and they
affect both the same texture unit N.
Cheers,
Carsten
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users
opensg2
Description: Binary data
------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce
_______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users