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
<<attachment: CodeVsFile.jpg>>
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

