Hello Carsten,

On 10.02.2014 17:24, Carsten Neumann wrote:

>>
>> What do you think? Could that be working?
>
> I guess so. It requires the application to keep track of the "handle"
> ints, but I the only other idea I have for modelling such a buffer
> object is as a container with dynamically added fields - which likely
> has it's own set of usability issues ;)
>
I see no problem for keeping track of the handles. Actually, the 
application does have to keep track of a lot of things anyway.

>> What I do not have considered is how to represent arrays of these
>> blocks. But first step first.
>>
>> What I really love about UBO is that they can be installed independently
>> of the running shader program and that they therefor allow to define
>> different levels of states.
>
> Hmm, that brings up another question: When should these buffer objects
> be bound? As a StateChunk which is part of a Material? Is there a pool
> of "candidate" buffer objects and the system binds the ones that are
> actually present in the active shader? Or should these behave more
> like a ShaderVariable, i.e. be "attached" to one (or multiple)
> ShaderProgram objects.
>
I see benefit for both. I would like to build up uniform blocks as 
material state chunks. This allows efficient fine grained control of 
complex material states. On the other hand to have global, shader 
program independent blocks, i.e. blocks that are by definition used for 
all programs, is beneficial. For instance to define a global material 
data base or to define lighting properties. So both situations should be 
possible.

Another great advantage of UBO blocks is that you can considerably cut 
down the number of API calls in order to establish a certain program 
state. If I understand correctly, for contemporary hardware often the 
main performance bottleneck is the number of API calls, especially if a 
lot of small objects are are to be rendered.

Gerrit, Dirk and other interested people, what do you think about such a 
facility in OpenSG? Should we go for it? Any better idea how to 
implement this in OpenSG?

Best,
Johannes





------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to