Hi Robert,

Yup, that seems to have done the trick. Now onward to no fixed
functionality, yippee (i.e. use osg_vertex etc in shader)

Thanks Again
Tom



On 29 September 2011 09:40, Robert Osfield <robert.osfi...@gmail.com> wrote:

> Hi Thomas.
>
> Could it be that you are hitting up against the NVidia driver issue
> relating to the handing of uniform arrarys.  The svn/trunk version of
> the OSG has a workaround for this issue so would recommend trying
> this.
>
> Robert.
>
> On Thu, Sep 29, 2011 at 3:30 AM, Thomas Hogarth
> <thomas.hoga...@gmail.com> wrote:
> > Hi Guys
> > I've been trying to run the osganimationhardware example for osg 3.0.1 on
> > windows7 32bit with Geforce GTX 560 and latest drivers 280.26 . In the
> past
> > I have had this running (not on this machine or osg version), I simply
> > downloaded the osgData collection with the nathan.osg and skinning.vert
> > shader file.
> > However now when I'm running it, anything that is skinned does not
> render. I
> > have altered the shader to just use the gl_Vertex position rather then
> the
> > weighted position and then the object renders (so verts are fine). I have
> > also used the boneWeight0 uniforms to colour the mesh and they seem to
> have
> > decent values.
> > The only thing that doesn't seem to have good values is
> > uniform mat4 matrixPalette[MAX_MATRIX];
> > When I checked the converted shader the value of MAX_MATRIX seems to be
> set
> > correctly, but if I used the first line of the first matrix as the colour
> > value, like
> > gl_FrontColor = matrixPalette[0][0];
> > It is always black,
> > Looking at the uniform attached to the geoms stateset I can see roughly
> the
> > following in the debugger
> > _uniformList = [2](("matrixPalette", ({_ptr=0x0d0bfb58 },
> > 0)),("nbBonesPerVertex", ({_ptr=0x0d0bf3b8 }, 0)))
> > _ptr = 0x0d0bfb58 {_parents=[1](0x0d0bfed8 {_parents=[1](0x00df9bf8
> > {_name="" _dataVariance=DYNAMIC _userDataContainer=0x00000000 })
> > _modeList=[0]() _attributeList=[1](((PROGRAM, 0), ({_ptr=0x0d0bc9c0 },
> 0)))
> > ...}) _type=FLOAT_MAT4 _numElements=3 ...}
> > osg::MixinVector<float> =
> >
> {_impl=[48](1.0000000,0.00000000,0.00000000,0.00000000,0.00000000,1.0000000,0.00000000,0.00000000,0.00000000,0.00000000,1.0000000,0.00000000,0.00000000,0.00000000,0.00000000,1.0000000,0.99998939,0.0046100151,0.00000000,0.00000000,-0.0046100151,0.99998939,0....
> >
> > So if the colour is the first vec4 of the matrixPalette uniform it should
> > be 1.0000000,0.00000000,0.00000000,0.00000000, but it's just black.
> > Can anyone confirm the osganimationhardware example is currently working
> > with these assets
> > http://www.openscenegraph.org/projects/osg/wiki/Downloads/SampleDatasets
> >
> > Any help would be awesome
> > Tom
> > PS
> > My config looks like this
> > #ifndef OSG_CONFIG
> > #define OSG_CONFIG 1
> > /* #undef OSG_NOTIFY_DISABLED */
> > /*#define OSG_USE_FLOAT_MATRIX
> > #define OSG_USE_FLOAT_PLANE
> > #define OSG_USE_FLOAT_BOUNDINGSPHERE
> > #define OSG_USE_FLOAT_BOUNDINGBOX*/
> > #define OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION
> > /* #undef OSG_USE_UTF8_FILENAME */
> > #define OSG_DISABLE_MSVC_WARNINGS
> > #define OSG_GL1_AVAILABLE
> > #define OSG_GL2_AVAILABLE
> > /* #undef OSG_GL3_AVAILABLE */
> > /* #undef OSG_GLES1_AVAILABLE */
> > /* #undef OSG_GLES2_AVAILABLE */
> > /* #undef OSG_GL_LIBRARY_STATIC */
> >  #define OSG_GL_DISPLAYLISTS_AVAILABLE
> >  #define OSG_GL_MATRICES_AVAILABLE
> >  #define OSG_GL_VERTEX_FUNCS_AVAILABLE
> >  #define OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
> >  #define OSG_GL_FIXED_FUNCTION_AVAILABLE
> > #endif
> > I mention it as originally I dived straight into trying it without any
> fixed
> > functionality essentially emulating gles2, but had this same issue. I've
> > then gone for the more standard build above, but the result is the same
> > (although now I see objects that aren't skinned) If I can get this
> working
> > again on desktop then I don't think getting it working on gles2 will be
> too
> > much hassle (unless I hit some shader variable length limit).
> > Also standard osgAnimationViewer works fine
> > _______________________________________________
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to