PDA

View Full Version : Finding available memory



HFAFiend
04-07-2001, 09:51 AM
Is there any way to find out how much texture memory is available? That would allow me to make sure that textures are scalled to a smaller size if their default size would use too much memory. Thanks.

Nutty
04-07-2001, 12:30 PM
Not under OpenGL. You really dont need it though. Just make it a user definable option. You might check that they have low VRAM, and use low res textures, without realizing that their system bus is overclocked to 200+ Mhz or something, in which case they could handle lots of texture uploads.

Just becase they are low on VRAM does not necessarily imply they cannot run at speed with big textures.

They might prefer it slow with nice textures.

Make it user definable.

Nutty

HFAFiend
04-07-2001, 12:38 PM
Yeah, but I would still like it to be automatic.... I know I could figure out how to have d3d find it, but I don't feel like messing with d3d just to find out the free space...I hope there's some way

Nutty
04-07-2001, 12:41 PM
There isn't. Not under OpenGL anyway.

This might change in the future though.

Nutty

IsaackRasmussen
04-08-2001, 02:38 AM
I think what Nutty tried to say with this,
"Just becase they are low on VRAM does not necessarily imply they cannot run at speed with big textures."

Is that you don't know how fast the graphicscard is, that your prog is running on.
The card could just as well be faster at getting textures from AGP than it's own VidMem or maybe not even have Vidmem in the first place... I think that the I740 worked this way, got all it's textures from sysmem through AGP.

Leo
04-08-2001, 05:37 AM
I've been thinking about this one for a while. Although there is no way to find out how much RAM there is, it should be possible to work out how many hardware texels are available. I haven't written this yet, but the method is this.

1: Make sure that the system has NO texture already in if.

2: Get the dimensions of the maximun texture size.

3: Create and bind a texture of max size.

4: check to see if the all textures are in hardware, if not goto 6:

5: go to step 3:

6: the number of textures in RAM * dimensions of textures = max hardware texels

7: dump all the textures.

I'm going to implement this next week or so, I'll post the results, if someone doesn't try it out first that is.

Leo

HFAFiend
04-08-2001, 07:30 AM
That could work, but what about the agp memory? Anyway, thanks for your help everyone.

Tilgovi
04-09-2001, 05:44 AM
Memory is somewhat important. In games with many textures even if your video card is amazing, without ram to hold the textures you will need to access the hard-drive to load textures very often, and this causes delays.

-Tilgovi

Nutty
04-09-2001, 07:25 AM
I thought we were discussing finding how much VRAM we have, not system ram.

Hull
04-09-2001, 07:39 AM
I think that knowing VRAM size is not very important, but it could help determining the system speed factor, and hence letting us setup the game for optimal performance on any system.

By doing extensive testings, like the one described above, it may give us some clue to wheter or not to use full texture detail or less depending on system capabilites.

I will probably write such a test program for my upcoming 3d game so that I can be sure that people gets the most out of it, without hazzling with the cfg's or the OS.

http://www.opengl.org/discussion_boards/ubb/smile.gif

Nutty
04-09-2001, 08:43 AM
I thought we covered this already. Using the amount of VRAM available to setup texture details/scale is not a good idea!

LOW VRAM does not necessarily mean it will be slow. Maybe a revolutionary new system comes out that doesn't even use VRAM, and therefore your app will use it's minimal settings for no reason.

Make it user definable to alter texture settings.

Nutty