Hello Gerrit,
Gerrit Voß wrote:
> On Tue, 2010-01-12 at 19:52 -0600, Carsten Neumann wrote:
>> I'm trying to find a problem with the hardware vertex skinning stuff I'm
>> working on. I have a HardwareSkinningAlgorithm container that holds a
>> program and a variables chunk, that are created when rendering for the
>> first time.
>> Switching to hardware mode for the second time (which creates a new algo
>> object) the gl ids returned by glCreateProgram() are the same ones than
>> the first time around, which I think leads the shader cache to return
>> cached ShaderExeVarChunk objects instead of creating new ones.
>
>> glCreateProgram() = 6
>> glAttachShader(6, 2);
>> glAttachShader(6, 5);
>> glAttachShader(6, 4);
>> glLinkProgram(6);
>> // error checks
>> glUseProgram(6);
>> glUniformMatrix(...);
>>
>> note the missing getUniformLocation() calls, even though the program was
>> relinked and locations became invalid.
>>
>
> I'll have a look and come back with the details ;)
thanks. I've worked around this for now by putting the variables
directly on the ShaderProgram but that means all the joint matrices get
copied for each SkinnedGeometry instead of only for each Skeleton. Plus
I think this is a fundamental problem with the way
ShaderProgramVariableChunks have their uniform locations invalidated.
Anyway, I think I forgot to mention that the test program I use is
testColladaLoader, it has the necessary stuff for animations hacked into
it. You also need a graphics card that can handle large numbers of
uniforms, there are 64 4x4 matrices copied for all the joints in the
character (8800 or better should be good though).
Cheers,
Carsten
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core