Allen Bierbaum wrote: > Any ideas on this one. I looked into it a bit and the behavior I am > thinking about is something like this: > > - After texture has been bound, the system automatically sets image to NullFC > - This frees the image fc memory > - The code detects that the system was the one that set the image to > NullFC and checks if the "allow null flag" is set. If so, it goes > about it's merry way. > > This means that even if the flag is set, if the user sets NullFC, the > system does it's normal behavior of unbinding the texture. > > Before I put time into implementing this though, does this behavior > make sense and do people think it would be valuable in OpenSG? (ie. > will a patch be accepted)
Sounds like a good plan. No objections to that, but I have some suggestions for the future: I can see this being expanded to allow the osg-image to be recreated from the data on the GPU, so I think it would make senes to make the flag an enum, rather than a boolean. This allows different policies to be added in the future through the same interface. Is there need for some way to query the current status, i.e. not-yet-uploaded, uploaded, uploaded-and-deleted-locally, etc? I think it might, for debugging if nothing else. Also, this might be useful for geometry data as well. I'm not saying we should go there, but thinking in that direction might make the implementation more reusable? Just my 2 cents. :) Cheers, /Marcus ------------------------------------------------------------------------------ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
