View Full Version : address of a texture in VRAM
02-08-2004, 07:04 PM
After setting up a texture using glTexImage2D(...), is it possible to find out the address of the texture in graphics card memory? If so, I don't need to call glTexImage2D for each frame and instead I can use a DMA to speed thing up.
Thanks for any suggestions.
02-08-2004, 07:49 PM
This is so far from being an advanced question.
Use texture objects.
02-08-2004, 08:12 PM
In a word, no. OpenGL's texture management abstracts the hardware such that client applications can't know about VRAM. This has some disadvantages (for example keeping all mip levels resident when a subset might suffice) but the abstraction is there for a reason. Consider that with several GL applications running (including maybe the windowing system of the OS) the driver can swap textures out of VRAM arbitrarily. You don't want to have to worry about this in your app.
Now, if you just want fast updating of texture data, then there is probably an extension to do it on your platform. For example on OS X, texture range (http://developer.apple.com/opengl/extensions/apple_texture_range.html) plus client storage will allow the GPU to pull texture data via DMA, for a very good speed boost.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.