Hi Joakim,
Thats the error with the previous suggestion
*****************************************'
FRAGMENT glCompileShader "" FAILED
FRAGMENT Shader "" infolog:
Fragment shader failed to compile with the following errors:
ERROR: 0:19: 'gl_Vertex' : undeclared identifier
ERROR: 0:20: 'gl_Normal' : undeclared identifier
ERROR: 0:20: 'normalize' : no matching overloaded function found
ERROR: 0:20: '=' : cannot convert from 'const float' to 'undefined
interpolation 3-component vector of float'
ERROR: 0:22: 'assign' : l-value required "ReflectVec" (can't modify a
varying)
ERROR: 0:23: 'assign' : l-value required "ViewVec" (can't modify a varying)
ERROR: 0:24: 'assign' : l-value required "NdotL" (can't modify a varying)
ERROR: 0:25: 'gl_Position' : undeclared identifier
ERROR: 0:25: 'ftransform' : no matching overloaded function found
ERROR: 9 compilation errors. No code generated.
glLinkProgram "" FAILED
Program "" infolog:
Fragment shader(s) were not successfully compiled before glLinkProgram() was
called. Link failed.
Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,
****************************************'''
But works fine if i have the following instead...
ref_ptr<StateSet> nodess3 (myshapegeode3->getOrCreateStateSet());
Which is doing a copy , right?
Sajjad
On Wed, Oct 15, 2008 at 11:55 PM, Joakim Simonsson <[EMAIL PROTECTED]>wrote:
> On Wed, 15 Oct 2008 23:48:40 +0200, ami guru <[EMAIL PROTECTED]>
> wrote:
>
>
> //create a new stateset
>> //with the default setting
>> capsuleState->setAttribute(capsuleProgramObject.get());
>>
>>
> Every thing look correct, but I am not sure about this line. Try this one
> instead:
>
> capsuleState->setAttributeAndModes(shaderNightDriving.get());
>
>
> --
> Joakim Simonsson
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org