[osg-users] JavaOsg

Rafael osgforum at tevs.eu
Tue Mar 10 15:36:47 PDT 2009


hi i use javaOsg and i have been trying to load a texture in a model but there are problems with setImage(Image image)

Texture2D myTexture = new Texture2D();
        myTexture= null;
        try{
            myTexture.setDataVariance(OBJECTDataVariance.DYNAMIC);            
        }
        catch(Exception e){
            //System.out.println(e.getStackTrace());
            System.out.println("Couldn't load a texture");
        }
        Geode myGeode = new Geode();
        Image img = new Image(); 
        img =null;
        img = openscenegraph.osgDB.osgDBNamespace.
                readImageFile("C:/...jpg");

       
            myTexture.setImage(img);
       
 ples if someone have a solution to this problem helpme, thanks

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=8195#8195








More information about the osg-users mailing list