Re: Texture size&count




"fungus" <openglMYSOCKS@xxxxxxxxxx> wrote in message
news:bd280211-3684-405d-884c-86aeb0473b27@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On May 19, 1:27 pm, "Wojciech \"Spook\" Sura" <wojciech.sura...@spam-
poczta.medi.com.pl> wrote:
Hi!

How to determine, on particular hardware, how many and how big textures
can
I load onto OpenGL?


There's no limit except the amount of RAM and pagefile.

Your graphics driver should to swap textures from RAM
to the graphics card as needed.



--
<\___/>
/ O O \
\_____/ FTB.

http://www.topaz3d.com/ - New 3D editor for real time simulation


That's not quite accurate. The limit is the amount of allocatable memory.
This can be limited by;

1) Address space. Basic Win32 limits user memory space to 2 gigabytes,
usually something less than that, although
if windows is started with the /3G flag, you can get 3 gigs. Win64 is
severely limited as well; no more than 7 Terabytes last I looked, wich is an
artificially small amount given 64-bit address space. yes, I deal with 7
Tbyte data structures (but not on Windows). Linux32 is usually limited to
3.5 gigs, unless it's a very old Linux.

2) available blocks. Windows fragments memory extremely badly, so the number
and size of large contiguous blocks of memory is limited. So, allocation of
multiple large blocks of memory can fail, even if the total amount of free
space is enough to hold it. Linux32 isn't nearly as fragged by the "dll load
location problem".

3) swap + ram, only if the sum of these is less that (1). In other words,
you can have 4 gigs of ram and 20 gigs of swap, and you still can't allocate
more than 2 gigs in win32.



For the OP: you need to check opengl errors, especially when dealing with
large allocations, check for GL_OUT_OF_MEMORY. And that defines how much you
can allocate: as much as you can before you get out-of-memory errors.

-also-
If you can use a compressed texture target type, it can save bunches of
memory and isn't all that much slower.

You can run some simple start-up stress tests to acertain how much memory
can be allocated by the user (via new[], malloc() or similar) or by an
OpenGL texture test (create, check for errors, force a texture load, check
for errors). The downside is that they can cause your machine to page badly
if you have much more swap than ram and ram much less than 2 gigs.

*finally* (wheh!) sometimes you just have to load textures on-the-fly. For
example, with out-of-core volume rendering applications. It may not be as
slow as you might imagine, especially for loading a large 2D image texture
group.
use a pool of texture ID's and just sub-texture load them as needed.

jbw



.



Relevant Pages

  • Re: swap file vs swap partition
    ... Since RAM is also very cheap now, ... most people just load enough RAM into their system to handle their load, ... and then configure enough swap to hold a crashdump of that RAM. ... Mini-dumps have made it a lot easier to get away with a small amount of swap. ...
    (freebsd-current)
  • Re: swap file vs swap partition
    ... Since RAM is also very cheap now, ... most people just load enough RAM into their system to handle their load, ... and then configure enough swap to hold a crashdump of that RAM. ... Mini-dumps have made it a lot easier to get away with a small amount of swap. ...
    (freebsd-questions)
  • Re: Add new Plain Text fonts and how?
    ... size under Tools - Internet Options - Fonts? ... FireFox for about 2 years due to all the security loopholes in IE, just using IE when I really had to, but I discovered FF got more and more bloated over time, and in Task Manager it shows it using 130K and more of my 374K RAM. ... I did really like the tweakability of FF, I had all fonts and font sizes tweaked to where I liked them, but I can't wait a half minute to a minute for many simple web pages to load! ... IE actually uses a lot more RAM than you think, as its core is loaded at boot time, and the amount of RAM shown by Task Manager for IE does not reflect this. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: virtual memory management
    ... add up all those process sizes you'll see where the space is going. ... the amount of process memory allocated but not currently resident in ... Reduce the load or add more RAM. ...
    (freebsd-questions)
  • Re: Fast mip-map generation
    ... Mip-Map Generation of this memory ... The next step is linear averaging, where you simply take 0.25*sum(four_source_pixels), possibly after ungamma-conversion of each of the source pixels. ... If you do go this route, then you should probably first convert the source texture to linear format, then generate all the reduced size texture before converting back to whatever format you want your texture to be in. ... load four source pixels into xmm0..xmm3. ...
    (comp.lang.asm.x86)