Hi Julien,

A texture subload callback is attached to the osg::Texture and has
nothing to do with osg::Image so you psuedo code and text is rather
confusing.  With the subload callback you have to implement the
texture creation in the load() method and the subloading in the
subload() method of your callback.

Robert.

On Tue, Jan 12, 2010 at 7:37 AM, Julien Valentin
<[email protected]> wrote:
> Hello
> I'm trying to make a GPU texture  loading strategy based on an osg::Image.
> I maintain update bounds in a derived MyImage class in a setData method and
> would like to use glTexSubImage in order to update local Image changes so I
> implement a coupled Subloadcallback in order to do that.
> But I don't manage  the Subload Method to be called as when I call dirty on
> osg::Image it always call the Load Method.
> Can you tell me what to do in order to make Subloadcallback::SubLoad to be
> called?
>
> MySubloadcallback  : public Subloadcallback {
> load(...){
>      cout<<load<<endl;
> }
> suloadoad(...){
>        cout<<subload<<endl; //never display
> }
> }
>
> static MyImage img;
>
> main(){
> img.setSubloadCallBack(new mySubloadCallBack());
> ...
> viewer.run();
> }
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to