Hi Rafael,

I'm not sure but I think JavaOSG does not continue active.. anyway I think
the problem could be related to:
  Texture2D myTexture = new Texture2D();
   myTexture= null;

....

   Image img = new Image();
   img =null;

If you do a "new" and after you set the variable to "null". Probably will
not work...

Rafa.

PS. Did you try osgvp? (https://gvsig.org/web/projects/gvsig-commons/osgvp)
trunk version works with osg 2.8.0.



On Tue, Mar 10, 2009 at 11:36 PM, Rafael <[email protected]> wrote:

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



-- 
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to