Hi,

I had the same problem but modified calls to loadShaderSourceFromFile(...)
to use the OSG_FILE_PATH like this

    if( !vShader->loadShaderSourceFromFile(
*osgDB::findDataFile*("resources/shaders/water.v"
)) )
        osg::notify(osg::WARN) << "ERROR: Could not load vertex shader
source!" << std::endl;

    if( !fShader->loadShaderSourceFromFile(
*osgDB::findDataFile*("resources/shaders/water.f"))
)
        osg::notify(osg::WARN) << "ERROR: Could not load fragment shader
source!" << std::endl;


Regards,
Brede


On Wed, May 6, 2009 at 2:03 PM, Ümit Uzun <[email protected]> wrote:

> Hi David and Adrian;
>
>
> >>I had something similar - I think this is just coz the shader
> "constructor" can't find the underlying shaders; AFAIK the resource folder
> has to be located in the same directory as the executable. Moving things
> around might work for you.
>
> I had copied in all resource same folder as executable, and I copied shader
> folder and all seperated shader files in same folder with executable one by
> one but anyone doens't work for me. Application is still warning me by the
> same vertex shader error.
>
> And I have updated application.cpp and water.f files in my project but
> result is same Adrian.
>
> Thanks for any helps.
>
> 2009/5/6 Adrian Egli OpenSceneGraph (3D) <[email protected]>
>
> Hi
>>
>> (1) Shader FIX
>>
>> (2) Use Trackball or Terrain Mainpulation, more easy to use for NOT
>> gamers, or use the osgViewer like motion model switch
>>
>>
>>
>>
>> 2009/5/6 David Spilling <[email protected]>
>>
>>> Umit,
>>>
>>> >...Error : When I open up the osgOceanExample there is some error in
>>> vertex shader as you can see from the attached screenshot.
>>>
>>> I had something similar - I think this is just coz the shader
>>> "constructor" can't find the underlying shaders; AFAIK the resource folder
>>> has to be located in the same directory as the executable. Moving things
>>> around might work for you.
>>>
>>> David
>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>>
>> --
>> ********************************************
>> Adrian Egli
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> --
> Ümit Uzun
>
> _______________________________________________
> 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

Reply via email to