In attachment osg file that doesn't work. When I activate osgShadow, I can't
see texture.
In osg file there's field "textureUnit 0 {}". If I remove this and change,
texture works.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36550#36550
PositionAttitudeTransform {
name "Collada visual scene group"
nodeMask 0xffffffff
cullingActive TRUE
StateSet {
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
}
referenceFrame RELATIVE
position 0 0 0
attitude 0.707107 0 0 0.707107
scale 1 1 1
pivotPoint 0 0 0
num_children 1
MatrixTransform {
name "Strada_Dritta_01"
nodeMask 0xffffffff
cullingActive TRUE
referenceFrame RELATIVE
Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
}
num_children 1
Geode {
nodeMask 0xffffffff
cullingActive TRUE
num_drawables 1
Geometry {
DataVariance STATIC
name "lambert4SG"
StateSet {
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
GL_CULL_FACE ON
Material {
ColorMode OFF
ambientColor 0 0 0 1
diffuseColor 1 1 1 1
specularColor 0 0 0 1
emissionColor 0 0 0 1
shininess 0
}
textureUnit 0 {
}
textureUnit 1 {
GL_TEXTURE_2D ON
Texture2D {
file "C:\\Documents and Settings\\All
Users\\Documenti\\ARGame\\Texture_DEF\\Strada_Dritto.jpg"
wrap_s REPEAT
wrap_t REPEAT
wrap_r CLAMP
min_filter LINEAR_MIPMAP_LINEAR
mag_filter LINEAR
maxAnisotropy 1
borderColor 0 0 0 0
borderWidth 0
useHardwareMipMapGeneration TRUE
unRefImageDataAfterApply TRUE
internalFormatMode USE_IMAGE_DATA_FORMAT
resizeNonPowerOfTwo TRUE
shadowComparison FALSE
shadowCompareFunc GL_LEQUAL
shadowTextureMode GL_LUMINANCE
}
TexEnv {
mode MODULATE
}
}
}
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 1
{
DrawElementsUInt TRIANGLES 132
{
0 3 6 6 3 8 40 43 49 49
43 46 10 12 14 14 12 17 36 38
1 1 38 4 5 39 9 9 39 30
37 2 33 33 2 7 55 52 61 61
52 58 15 26 11 11 26 23 16 18
27 27 18 28 20 29 13 13 29 19
34 31 24 24 31 21 26 37 23 23
37 33 27 28 36 36 28 38 30 39
20 20 39 29 6 8 41 41 8 44
9 30 45 45 30 47 32 35 48 48
35 50 33 7 51 51 7 42 25 22
56 56 22 53 20 13 54 54 13 59
12 10 60 60 10 62 11 23 63 63
23 57
}
}
VertexArray Vec3Array 64
{
0.999613 0 0.999415
0.999613 0 0.999415
0.999613 0 0.999415
0.999613 0 -0.999398
0.999613 0 -0.999398
0.999613 0 -0.999398
0.999613 0.00739819 0.999415
0.999613 0.00739819 0.999415
0.999613 0.00739819 -0.999398
0.999613 0.00739819 -0.999398
-0.999199 0.00739819 0.999415
-0.999199 0.00739819 0.999415
-0.999199 0.00739819 -0.999398
-0.999199 0.00739819 -0.999398
-0.999199 0 0.999415
-0.999199 0 0.999415
-0.999199 0 0.999415
-0.999199 0 -0.999398
-0.999199 0 -0.999398
-0.999199 0 -0.999398
-0.807709 0.00739819 -0.999398
-0.807709 0.00739819 -0.999398
-0.807709 0.00739819 -0.999398
-0.807709 0.00739819 0.999415
-0.807709 0.00739819 0.999415
-0.807709 0.00739819 0.999415
-0.807709 0 0.999415
-0.807709 0 0.999415
-0.807709 0 -0.999398
-0.807709 0 -0.999398
0.807909 0.00739819 -0.999398
0.807909 0.00739819 -0.999398
0.807909 0.00739819 -0.999398
0.807909 0.00739819 0.999415
0.807909 0.00739819 0.999415
0.807909 0.00739819 0.999415
0.807909 0 0.999415
0.807909 0 0.999415
0.807909 0 -0.999398
0.807909 0 -0.999398
0.999613 0.0239958 0.999415
0.999613 0.0239958 0.999415
0.999613 0.0239958 0.999415
0.999613 0.0239958 -0.999398
0.999613 0.0239958 -0.999398
0.999613 0.0239958 -0.999398
0.807909 0.0239958 -0.999398
0.807909 0.0239958 -0.999398
0.807909 0.0239958 -0.999398
0.807909 0.0239958 0.999415
0.807909 0.0239958 0.999415
0.807909 0.0239958 0.999415
-0.807709 0.0239958 -0.999398
-0.807709 0.0239958 -0.999398
-0.807709 0.0239958 -0.999398
-0.807709 0.0239958 0.999415
-0.807709 0.0239958 0.999415
-0.807709 0.0239958 0.999415
-0.999199 0.0239958 -0.999398
-0.999199 0.0239958 -0.999398
-0.999199 0.0239958 -0.999398
-0.999199 0.0239958 0.999415
-0.999199 0.0239958 0.999415
-0.999199 0.0239958 0.999415
}
NormalBinding PER_VERTEX
NormalArray Vec3Array 64
{
1 0 0
0 -1 0
0 0 1
1 0 0
0 -1 0
0 0 -1
1 0 0
0 0 1
1 0 0
0 0 -1
-1 0 0
0 0 1
-1 0 0
0 0 -1
-1 0 0
0 0 1
0 -1 0
-1 0 0
0 -1 0
0 0 -1
0 0 -1
0 1 0
1 0 0
0 0 1
0 1 0
1 0 0
0 0 1
0 -1 0
0 -1 0
0 0 -1
0 0 -1
0 1 0
-1 0 0
0 0 1
0 1 0
-1 0 0
0 -1 0
0 0 1
0 -1 0
0 0 -1
0 1 0
1 0 0
0 0 1
0 1 0
1 0 0
0 0 -1
0 1 0
0 0 -1
-1 0 0
0 1 0
-1 0 0
0 0 1
0 1 0
1 0 0
0 0 -1
0 1 0
1 0 0
0 0 1
0 1 0
0 0 -1
-1 0 0
0 1 0
-1 0 0
0 0 1
}
TexCoordArray 1 Vec2Array 64
{
0 0
0 0
0 0
1 0
1 0
1 0
0 0
0 0
1 0
1 0
0 1
0 1
1 1
1 1
0 1
0 1
0 1
1 1
1 1
1 1
1 0.904198
1 0.904198
1 0.904198
0 0.904198
0 0.904198
0 0.904198
0 0.904198
0 0.904198
1 0.904198
1 0.904198
1 0.095909
1 0.095909
1 0.095909
0 0.095909
0 0.095909
0 0.095909
0 0.095909
0 0.095909
1 0.095909
1 0.095909
0 0
0 0
0 0
1 0
1 0
1 0
1 0.095909
1 0.095909
1 0.095909
0 0.095909
0 0.095909
0 0.095909
1 0.904198
1 0.904198
1 0.904198
0 0.904198
0 0.904198
0 0.904198
1 1
1 1
1 1
0 1
0 1
0 1
}
}
}
}
}
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org