Post

 Resources 

Console


Performance of DrawIndexedPrimitive Noah Adler (6 replies, 0 views) (2000-Jun-25)
-
Well I recently decided to try to use DrawIndexedPrimitive in place of DrawPrimitive, hoping for a performance increase...but to my surprise, I got anything except an increase. The speed dropped an *enormous* amount! I thought the app was crashing, but nope, turns out it was just taking it's sweet time (maybe 30 seconds?) to render each frame!! Here's some code: ----- vertIdx(0) = (i - 1) + (j - 1) * 64 vertIdx(1) = (i - 1) + (j - 1 + MapStep) * 64 vertIdx(2) = (i - 1 + MapStep) + (j - 1) * 64 vertIdx(3) = (i - 1 + MapStep) + (j - 1 + MapStep) * 64 vertSet(1) = MapVerts(vertIdx(0)) vertSet(2) = MapVerts(vertIdx(1)) vertSet(3) = MapVerts(vertIdx(2)) vertSet(4) = MapVerts(vertIdx(3)) ' Render quad d3ddev.DrawPrimitive D3DPT_TRIANGLESTRIP, D3DFVF_LVERTEX, vertSet(1), 4, D3DDP_DEFAULT 'd3ddev.DrawIndexedPrimitive D3DPT_TRIANGLESTRIP, D3DFVF_LVERTEX, MapVerts(0), 4096, vertIdx, 4, D3DDP_DEFAULT ----- BTW, this is intended to render a single bent quad in a heightmap, in case you couldn't tell ;-) i and j are just variables used for iteration. I figured that I would save processing time by not having to copy the vertices from MapVerts() array into a temporary array to be used for rendering the quad, but apparently not! Well I obviously did something wrong, but I'm stumped...I'd greatly appreciate any help...thanks!! Noah Adler


-
Back to Forum

Sure - use OpenGL! *grin* The Gilb (1 reply) (2000-Jun-26)
RE: Sure - use OpenGL! *grin* Soop (0 replies) (2000-Jun-26)
DrawIndexedPrimitive Carl (3 replies) (2000-Jun-26)
RE: DrawIndexedPrimitive Noah Adler (0 replies) (2000-Jun-26)
RE: DrawIndexedPrimitive Corre (1 reply) (2000-Jun-28)
RE: DrawIndexedPrimitive Noah Adler (0 replies) (2000-Jun-28)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 85 visitors within the last 20 minutes
RSS News Feed