On Mon, Nov 29, 2010 at 6:03 PM, Robert Osfield <[email protected]>wrote:

> Hi Tim,
>
> Here in Scotland we're snow bound - 30cm of snow already and more
> falling right now, so school is closed, and so I'm working part-time
> while my wife and I take turns to work/look after the kids.  Fun, but
> not so good for getting submissions reviewed!
>
> My son would be very jealous! Isn't Hogwarts near there somewhere?


> I'm now back from taking the kids out and learning a bit more about
> uniform buffer objects.  Boy is complicated.  Both from the extension
> perspective and the implementation and usage on the OSG side.  Even
> the example that in essence is quite straight forward in what it's
> doing is hard to follow,
>
> Do you have any ideas on how we might simplify things further? Anyone else?
>
I guess it depends on where the trouble lies. I see that there are a couple
of unfortunate name choices: in the example, "UniformCallback" should be
"UniformBindingCallback", and "addBindUniformBlock" could be
"addUniformBlockBinding."

I agree that the idea of a state attribute that represents the association
between a numbered binding point and a buffer is complicated, but this is
the way the feature works in OpenGL, and and I'm reluctant to layer too much
on top of that. Furthermore, the fact that this binding is a state attribute
makes it much more flexible than the alternative of tying ubos directly to
programs.

As I've mentioned before, one thing that is missing is the association
between the program uniform variables and their offsets in the uniform
buffer. This means that only the std140 layout is useful without additional
user code, and even that is a bit mysterious with hard-coded offsets popping
up all over the place.

As you look at it more, let me know what is still giving you trouble.

Stay warm,
Tim

>
> Robert.
>
> On Mon, Nov 29, 2010 at 1:36 PM, Tim Moore <[email protected]> wrote:
> > Hi Robert,
> > The uniform unique ID change (bravo, by the way!) should have no effect
> on
> > my uniform buffer submission. Uniform blocks and uniform block bindings
> > don't act like uniforms, and the uniforms inside a uniform block are not
> > accessible through the existing uniform variable interface.
> > There is an issue tangentially related to uniforms, for a future
> submission.
> > There are three ubo-related values in play:
> > the block name, as given in the shader;
> > the block index, which is associated with the block name when the program
> is
> > linked;
> > the buffer binding point (a small integer) which is assigned a block
> index
> > During the course of the program different buffer objects can be bound to
> a
> > binding point, which is the model this submission supports, and is
> > illustrated by the example program. For simplicity I fixed the block
> index
> > <-> binding point association at program link time, but in reality the
> > binding is not fixed and could be manged in OSG like a uniform.
> > Tim
> >
> > On Mon, Nov 29, 2010 at 12:15 PM, Robert Osfield <
> [email protected]>
> > wrote:
> >>
> >> Hi Tim,
> >>
> >> I'm currently reviewing your uniform buffer changes, I'm still mid
> >> review so haven't yet got a full picture of how the extension all
> >> works.  One thing I'd like to run past you is the whether the new
> >> support for using unique ID's for uniform names will effect your
> >> uniform buffer work. The unique ID's were introduced to lower the cost
> >> of finding the uniform's names in the osg::Program's uniform maps.
> >>
> >> Any thoughts on this topic?
> >> Robert.
> >> _______________________________________________
> >> osg-submissions mailing list
> >> [email protected]
> >>
> >>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> >
> >
> > _______________________________________________
> > osg-submissions mailing list
> > [email protected]
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> >
> >
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to