View Full Version : How to handle vertex overhead?
02-08-2001, 05:31 AM
Given a scene with, let's say 200 objects (wich ins't much) with each 100 vertices
that would be 200,000 vertices. each vertic consists of 3 coords and a cood is stored as float. That's quite a bunch! aprox 2400Kbytes in memory only for the points! Is windows capable of managing this?
02-08-2001, 05:36 AM
My application uses approx. 2 million vertices, connected primarily by triangle strips. Works like a charm (well, the Gl part http://www.opengl.org/discussion_boards/ubb/smile.gif ). Granted, this is in Linux, but I highly doubt Windows would pose too much of a problem here.
2.4 MB of data isn't much on todays computers. 2.4 MB is only slightly more than 1.5 3.5" disks http://www.opengl.org/discussion_boards/ubb/biggrin.gif
02-08-2001, 06:02 AM
So you use aprox 6 million floats, each 16 or 32 bits ? *cool* http://www.opengl.org/discussion_boards/ubb/smile.gif
02-08-2001, 01:30 PM
You're right, 2.4 MB isn't much on 128MB machine, but that's only for the vertex-coords! There are even more ram-consuming things like textures, AI, Sound etc
Methinks that's to much http://www.opengl.org/discussion_boards/ubb/wink.gif
I believe you can create a vertex array. Just a week ago there was a glVertexArray(?) demo from NVIDIA. Apparently only geforce cards are capabale manipulating the array in hardware (if I'm not mistaken). Hence I believe you could store all that on Vid cards RAM.
Also you have to take virtual memory into account. If you have 24megs of vertices, I doubt Windows (which is in contrary to everything else pretty good at virtual memory) or Linux will load all the vertices. They reside on the disk and read in blocks as they are referenced. This could hit your performance to some degree.
Textures are usually stored in the videomemory, and not in the system memory. AI shouldn't consume so much memory, or am I wrong? I haven't done any AI yet, so I can only guess, and I can't think of any AI-related stuff that drains that much memory. And for sound, how much sound do you have? Even though you have quite a few sound effects, they still don't consume immense amounts of memory, unless you store complete songs as raw data.
My engine, in it's current state, handles about 30 MB of data, and I'm still far from done, so more is to come. And I'm aming for a somewhat memoryoptimized engine, so it's not very much unecessary data. I haven't had any trouble at all with the memory so far.
And as a sidenode, I got 128 MB RAM, so I do have to think about not using TOO much memory http://www.opengl.org/discussion_boards/ubb/tongue.gif
02-09-2001, 08:48 AM
Well, it was not the sound or the AI in special, but if you take all the things, it seems a bit funny that only the vertices could consume about 30% ore more of your resouces. But otherwise.. if you look at games like diablo wich are only 2d, they have to store all the bitmaps for the aniamtions in memory and it does work http://www.opengl.org/discussion_boards/ubb/smile.gif
So I shouldn't worry to much about it I think http://www.opengl.org/discussion_boards/ubb/wink.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.