Hi Tat,

I have been able to run osgOcean by modifying the shaders, but the frame rate 
was not acceptable (15 FPS).  I have also applied the patch to Texture.cpp, but 
it didn't resolve the FBO errors.
Given the framerate is too low, I stop trying to run the software on that 
graphics card.

Thanks a lot for your help. 

Jean-Claude

On Sep 6, 2010, at 10:24 PM, Tatsuhiro Nishioka wrote:

> Hi Jean-Claude,
> 
> Though I don't use osgOcean, I can help you on this.
> 
> On Sep 7, 2010, at 1:50 AM, Jean-Claude Monnin wrote:
> 
>> When I run "oceanExample", I get following errors:
>> 
>>      VERTEX glCompileShader "ocean_surface_vertex_shader" FAILED
>>      VERTEX Shader "ocean_surface_vertex_shader" infolog:
>>      ERROR: 0:50: 'gl_' : reserved built-in name 
>> 
>>      FRAGMENT glCompileShader "ocean_surface_fragment_shader" FAILED
>>      FRAGMENT Shader "ocean_surface_fragment_shader" infolog:
>>      ERROR: 0:60: '/' :  wrong operand types no operation '/' exists that 
>> takes a left-hand operand of type 'const float' and a right operand of type 
>> 'const int' (or there is no acceptable conversion)
>>      ERROR: 0:214: 'pow' : no matching overloaded function found 
>>      ERROR: 0:214: '=' :  cannot convert from 'const float' to '2-component 
>> vector of float'
>> 
>>      glLinkProgram "ocean_surface" FAILED
> 
> The errors above have something to do with nVidia's problem on implicit cast 
> from integer to float.
> Somehow some of nVidia drivers omit the cast part and then try to pass an 
> integer parameter to a function (like pow) that requires a float parameter, 
> and thus you get wrong operand types, no matching overloaded function, or 
> undefined symbol.
> A solution for this is to replace integer constants (like 1, 2, 3, ...) with 
> explicit float ones (e.g. 1.0, 2.0, 3.0, ...) in shader source code.
> 
> This can be a mac specific issue but it is safer to use float constants in 
> shader code unless integer constant is clearly needed.
> 
> 
>> As long as I don't disable all the options that use a FBO, I get garbage on 
>> the screen.
>> Is anybody using osgOcean successfully on MacOSX. Is the graphics card too 
>> old for osgOcean? If the graphics card should be capable of running it, any 
>> hints on how to fix it are welcome.
> 
> GT7300 driver on Mac OS X has a problem in hardware mipmapping.
> So you need to disable it by applying my patch to Texture.cpp. The patch is 
> available at:
> http://macflightgear.svn.sourceforge.net/viewvc/macflightgear/trunk/patches/OSG-2.9.8.diff?revision=279&view=markup
> 
> # This patch (for Texture.cpp) was once rejected since this hack is too drive 
> specific bug-fix.
> 
> Best,
> 
> Tat
> 
> _______________________________________________
> 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