Ok, I think that introduced a different error: try "/" rather than "\".

If all else fails, look at and derive from glsl_simple.osg.  It's a
known-working example.

-- mew


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Dunhour, Mike (CIV)
> Sent: Thursday, April 10, 2008 12:35 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] using Shader file call - what Shader
> version..Clarification
> 
> 
> 
> ok, a couple datapoints: the .osg format parser:
> 1) is case-sensitive
> 2) silently ignores anything is doesn't recognize.
> 
> Your example shows "File" when the actual keyword is "file".
> 
> Excerpt from the glsl_simple.osg example:
> 
>         Shader {
>           DataVariance DYNAMIC
>           type VERTEX
>           file shaders/shader.vert
>         }
> 
> -- mew
> 
> 
> Hopefully more helpful
> Using .osg file exported from 3DSmax_v8 using osgexporter
> Object is just a quad
> These lines edited into the file under Geode section
> 
>     StateSet {
>       DataVariance STATIC
>       rendering_hint DEFAULT_BIN
>       renderBinMode INHERIT
>       Program {
>         DataVariance STATIC
>         name "Testy"
>         num_shaders 1
>         Shader {
>           DataVariance DYNAMIC
>         type FRAGMENT
>         code {
>           "void main (void)"
>           "{"
>           "    gl_FragColor = vec4 ( 0.0, 0.0, 1.0, 1.0 );"
>           "}"
>         }
>       }
> 
> Which does frag_color the quad blue
> 
> Tried to replace with
> 
>     StateSet {
>       DataVariance STATIC
>       rendering_hint DEFAULT_BIN
>       renderBinMode INHERIT
>       Program {
>         DataVariance STATIC
>         name "Testy"
>         num_shaders 1
>         Shader {
>           DataVariance DYNAMIC
>           type FRAGMENT
>           file shaders\s.frag
>         }
>       }
> 
> No error message, but quad just maintains color assign during creation
> in 3DSmax
> 
> 
> Thank you for your reply
> 
> Mr. D
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to