[osg-users] osg::Texture and stateSets

ka Ming ming_ka at yahoo.de
Thu Jul 10 05:48:48 PDT 2008


Hi,
I am already looked at the optimizer.
But still I cannot access my Texture ;(.
stateset.getTextureAttributeList() is always null. Why? 
I can call the geode Name. I can call the Geometry - but no Texture!!!

My OSG File:

Geode {
  DataVariance DYNAMIC
  name "cube.osg"
  nodeMask 0xffffffff
  cullingActive TRUE
  num_drawables 6
  Geometry {
    DataVariance DYNAMIC
    StateSet {
      DataVariance DYNAMIC
      rendering_hint OPAQUE_BIN
      renderBinMode INHERIT
      GL_CULL_FACE OFF
      GL_LIGHTING ON
      textureUnit 0 {
        GL_TEXTURE_2D ON
        Texture2D {
          DataVariance STATIC
          file "images.jpg"
          wrap_s CLAMP
          wrap_t CLAMP
          wrap_r CLAMP
          min_filter LINEAR_MIPMAP_LINEAR
          mag_filter LINEAR
          maxAnisotropy 1
          useHardwareMipMapGeneration TRUE
          unRefImageDataAfterApply FALSE
          internalFormatMode USE_IMAGE_DATA_FORMAT
        }
      }
    }
..........

Some Ideas??


冯晨 wrote: 
 
 
 Hi,
    I think osgUtil::optimizer::TextureVisitor should solve your problem.....:)
    Good luck.


 
在2008-07-09 22:53:21,"ka Ming" <ming_ka at yahoo.de> 写道:

Hi,
I got a Probel with osg Files, the File structure looks like:
Group{
    Geode{
        Geometry{
            StateSet{
                Texture{
                }
            }
        }
    }    
    Geode{
        Geometry{
            StateSet{
                Texture{
                }
            }
        }
    }
}
The problem is if I try to traverse my SceneGraph I get the names of my geodes, but if I check the TextureAttributeList
osg::StateSet::TextureAttributeList texAttrList = stateSet-> getTextureAttributeList();
this list is empty. Why is this List empty, did I forget something? I want to access all Textures!!
Thanks
Ming


________________________________
 Gesendet von Yahoo! Mail. 
Dem pfiffigeren Posteingang.

________________________________
 网易首款免费3D网游“天下2”,6月6日激情公测  

________________________________

_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


      __________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080710/10fa0ac7/attachment-0003.htm>


More information about the osg-users mailing list