Hi Mihai,

On 9/11/06, Mihai Radu <[EMAIL PROTECTED]> wrote:
Is there any place to start looking for management of textures and texture
units ? I'm not sure if this would be at the viewer level or at the
scenegraph level.

osg::Texture is the base class for all the texture subclasses, and the texture unit which they are assigned to is set up in osg::StateSet via the setTextureAttribute(unit, attribute) API.
 
What would make me very happy would be something that could allow me to
manage not just the texture objects within OSG, but also to have the ability
to controll where they are stored also, in GPU ram or in system memory.

OpenGL doesn't provide any controls for this, and its the model rather dictates that there is always a copy of the texture object managed by the OpenGL driver in system memory, and this is copied into the GPU's local memory on demand and cached their till the driver decides it needs that space for more recent requests.  The exact rules the OpenGL driver uses to decide which textures on the GPU's local memory to discard will likely vary from driver to driver, in its simplicist form it'll be ones that were used the longest time ago will be swapped out first.

Robert.


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to