Hello Johannes, On Fri, Feb 7, 2014 at 11:31 AM, Johannes Brunen <jbru...@datasolid.de> wrote: > has there been any development, thinking etc. about uniform blocks > according to the ARB_uniform_buffer_object extension?
not on my end, sorry. > How could that be implemented in OpenSG? > Are there any fundamental obstacles in the context of OpenSG? Hmm, one thing that distinguishes buffer objects used to back uniform blocks from other uses (in OpenSG), is that they do not contain a large amount of data of *the same type* - i.e. for VBOs you usually have large chunks of say vec3/4 for positions/normals etc. while for a uniform block you'll get much more varied types depending on what kind of information needs to be passed to your shader. The same type case maps nicely to MField<T> so we can represent such buffers as arrays of some type T. I don't immediately have an idea what would be a good way to represent the mixed type case (and the alignment issues it brings with it [1]), suggestions would be welcome. > For me that seems to be the correct tool for shader/uniform management. I think they are good for cases where you have a number of uniforms that only change from frame to frame (as opposed to between objects) and need to be passed to multiple shaders - I understand that could well be your use case ;) Cheers, Carsten [1] I'd think it would be reasonable to only support uniform blocks that have layout(std140) to simplify this a bit. ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users