Skip to main content
gamedev.net
🔒 Locked

#rror

Started by designlord 5 replies 400+ views
Original Post
designlord
designlord
<#rror> [Edited by - designlord on November 7, 2004 11:52:32 AM]
"Nothing you can't spell will ever work." - Will Rogers
thedo
thedo
Take

NumberTriangles = ( TerrainSize - 1 ) * ( TerrainSize - 1 ) * 2;

And make TerrainSize 183.

NumberTriangles = ((183-1)*(183-1))*2 == 66248.

A LOT of GFX cards have a MAXIMUM primitive count of 65536 (16Bit)([EDIT]Per vertex Buffer[/EDIT].

You have too many triangles if terrainSize>182.

NumberTriangles = ((182-1)*(182-1))*2 == 65522

65522<65536 therefore thats OK. You just need to check your cards CAPS to ensure I am correct.

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

[edited by - thedo on November 18, 2003 2:55:22 PM]
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
Dave Hunt
Dave Hunt
What is VERTEX_TYPE? You have MeshFVF defined as the FVF for the mesh. Isn''t that what you should have passed?
thedo
thedo
Maybe 16Bit vertices are a limitation of D3DXMeshes then - so everyone can use them.

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
thedo
thedo
Why are you using the D3DXMESH, out of interest?

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
thedo
thedo
Currently I''ve been designing a DLL which renders physical simulations, based on data from an XML file, vertex/pixel shaders from fx files (loaded from the XML). Idea is to provide a method of loading whole worlds from XML files, having the graphics totally customisable.

Currently it supports:

Stencil Shadows
HW T+L/VS/PS where supported
Rigid body physics/dynamics
XML driven data- can dynamically change almost any aspect of the simulation by changing the XML

The reason I asked why you are using the Mesh structure is that you must be populating it manually. A Mesh is a small wrapper for VB/IB and Attributes. You already have those, so why use a D3DMesh? The only reason I can see is so you can save your Terrain as an X-file. I use the structure for loading X files, but then extract the data into my VB/IBs and can optimize them to best fit my needs.

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
EvilDecl81
EvilDecl81
quote:
Original post by thedo
Currently I''ve been designing a DLL which renders physical simulations, based on data from an XML file, vertex/pixel shaders from fx files (loaded from the XML). Idea is to provide a method of loading whole worlds from XML files, having the graphics totally customisable.

Currently it supports:

Stencil Shadows
HW T+L/VS/PS where supported
Rigid body physics/dynamics
XML driven data- can dynamically change almost any aspect of the simulation by changing the XML

The reason I asked why you are using the Mesh structure is that you must be populating it manually. A Mesh is a small wrapper for VB/IB and Attributes. You already have those, so why use a D3DMesh? The only reason I can see is so you can save your Terrain as an X-file. I use the structure for loading X files, but then extract the data into my VB/IBs and can optimize them to best fit my needs.

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!



Meshes allow you to call D3DXOptimizeMesh which can give you up to a 500% perf increase, (usually around 30%).
EvilDecl81

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.