Hello Gerrit,
Gerrit Voß wrote:
> On Sat, 2010-01-16 at 10:10 -0600, Carsten Neumann wrote:
>> Gerrit Voß wrote:
>>>> I'm not sure I understand how one SEVarChunk can reliably be used with
>>>> more than one SEChunk, since the uniform locations seem to be stored in
>>>> the former, but can be different for different SEChunks?
>>> It never could, that followed 1.x which stored the chunk to which the
>>> variables reference explicitly.
ok, it's just something one has to be aware of, as the SVarChunk seems
to suggest that it can be shared across materials with different
SProgChunks, which it can not - it must be the same SProgChunk on all
materials.
>>> I have a look how it could be extended.
>>> I have to check what happens if the shader it recompiled anyway.
hm, reading the extension spec for GL_ARB_uniform_buffer_object and
thinking about this a bit more, it seem that it is in line with what one
can do in OpenGL that the SVarChunk can only be used with *one*
SProgChunk - we'd have to track a uniform's locations in multiple programs.
The spec seems to suggest that the preferred way to share uniform data
across multiple shaders is to use a named uniform block.
Anyway, given the 'limitations' of the SVarChunk I now have a bit of
trouble seeing what it is good for, i.e. when would it make sense to use
one instead of keeping the variables directly on the SProgChunk?
Ah, we can not have variables on the SProgChunk only on the
ShaderProgram objects, why is that?
Would it make more sense to allow variables on SProgChunk (and SProgram)
and not have SVarChunk? At least that would avoid the pitfall of
attempting to share SVarChunks.
I think there is something I'm missing here...?
Thanks,
Carsten
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core