Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Wavewash

Geometry and Texture Handling

This topic is 5484 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I was looking at some code for loading a Quake3 level and wasn''t sure if I was really understanding the texture loading process of it. Are all the textures loaded into video memory that the level will need at once? Or are they loaded and unloaded in chunks? And does this go for the geometry too? I''m a little unsure how texture and geometry are handled in a games like quake3. Is all the geometry loaded into memory at once along with all the textures and lightmaps? Or is it shuffled in and out of memory? The code I was looking at loaded it all into memory and this didn''t seem practical (Or is it?) because for a level that has say 100 textures that''s quite a bit of memory and what happens if a video card doesn''t have enough memory? I''m not looking for code just mebbie a general answer. Thankyou! ~Wave

Share this post


Link to post
Share on other sites
Advertisement
I''ve never looked at the source code for loading a Quake 3 level but it makes sense that everything is loaded beforehand. If it wasn''t then the game would pause whenever you entered a different part of the level (ala Everquest) so that it could load everything. I doubt that everything is dumped to VIDEO memory at once, then again I may be wrong. That''s my guess...

Share this post


Link to post
Share on other sites
Well in OpenGL, you can load everything as a OpenGL texture and the textures will be shifted out of VRAM into SRAM as needed following a LRU scheme(I think it was LRU).

Share this post


Link to post
Share on other sites
Ouranos, I think that you''re right and I do beleive that DirectX also does the same thing. So loading all the textures into memory isn''t much of a problem because directX handles moving it in and out of video memory.

Thanks!
~Mo

Share this post


Link to post
Share on other sites
Yes and there are some functions to reorder the priority. As a client you may know which texture is more important for perfs. Basically you can anticipate more the future than the LRU. For instance you know that the player will enter a teleport.

Share this post


Link to post
Share on other sites
Let Windows do the dirty job:
First, you have to know that storing a file in memory is always better than keeping it in a file. If you don't have enough memory, it will be swaped to disk, but at least... it is loaded and will only need to be paged back to be accessible.

Let your video driver do the other dirty job:
The same applies for video memory, if you try to load everything in video memory, at one point, there will be no more space and the driver will put it in AGP instead. This is still better than keeping them on file.

Give hints to your video drivers:
Loading your most important and most used resources first is a good way to make sure it is in video memory and will stay there.

Give hints to yourself:
ATI and nVidia provide a lot of information on how to optimize memory and resources and how to take full advantage of GPU.


Oooh, you found the horadric nuke!
Did you know, that by using a horadric nuke, you can blow up Diablo and solve all our problems!

[edited by - Coincoin on June 21, 2003 4:01:58 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!