View Full Version : quick question on texture storage...
07-27-2007, 04:46 AM
I apologise for a 'newbie' question but if, for example, i have 20mb of textures and send them to a 16mb graphics card, does opengl store 16mb in video RAM & 4mb in system RAM, or does it store all 20mb in system ram and makes a copy in video memory? In other words does it store textures once or twice?
BTW - I know I'm simplifying here and ignoring frame buffers etc. I just need to work out the most efficient use of memory.
07-27-2007, 05:52 AM
You can expect that generally no splitting of a single texture image is taking place.
(Not discussing architectures here which might provide virtual texturing or somesuch.)
Your 20 MB texture won't fit into your 16 MB video memory, so it will either not work at all or because modern graphics chips are able to access AGP (ok, that's not so modern anymore ;) ) or PCI-Express memory, the texture will be put there and texture fetches go over the bus.
Textures are backed up by a system memory copy in OpenGL (same as what D3D calls "managed pool") because it can happen at any time that the OS takes the framebuffer away for resolution switches or sleep modes.
07-27-2007, 05:58 AM
I read your question differently, you are talking about multiple textures that add up to 20MB correct?
If so, then you are correct in assuming that most OpenGL implementations store all 20mb in system ram and swaps in and out of video memory as needed.
(OpenGL does not define this behavior, this is just what most implementations do)
07-27-2007, 06:09 AM
Many thanks for the reply(s).
Sorry, I should have said the 20mb consisted of many smaller textures... but you answered the question anyway - textures in video memory are just copies from system RAM.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.