how about many mesh?

Started by
2 comments, last by jollyjeffers 17 years, 12 months ago
when I create many mesh,it should out of video memory.what will happen? the extra mesh will be automaticly moved to memory? or just crash?
Advertisement
another quesion:

Introduction.To.3D.Game.Programming.With.DirectX.9.0 said:
Rendering data from video memory is done much faster than rendering data in system memory.

how can I render mesh in memory? if you render a mesh,it must be video memory,mustn't it?
Technically, you can't render from system memory. If you try to, then the driver will transfer data from system memory into video memory, and then render it.

If your resources are in the default pool (D3DPOOL_DEFAULT), then yes, you'll eventually get D3DERR_OUTOFVIDEOMEMORY returned, indicating that you're out of video memory. If your resources are in the managed pool (D3DPOOL_MANAGED), then D3D will swap resources between video memory and system memory in order to stop you running out of video memory. So older resources will be thrown into system memory to make room for the new resource when the time comes for that data to be required (At render time).
Steve's covered it... but just to add that creating just meshes (e.g. ID3DXMesh instances) is highly unlikely to consume all your resources. You'd either need millions of low-poly or 100's of high-poly meshes before you got close to filling a 128mb VRAM card [smile]

It's usually texture resources that you want to be worried about.

Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement