Skip to main content
gamedev.net
🔒 Locked

dynamic buffers

Started by supagu Dec 30, 2003 at 4:46 AM 1 replies 300+ views
Original Post
supagu
supagu
right, i tried using dynamic buffers for my statics, because i transform them at load time. Now I get pretty poor frame rates because my application spends so much time copying data into the index and vertex buffers, is there: a) a quick way to copy, quicker than memcpy (what about indices that need to be adjusted?)? b) a better way to do mat id''s, i could but say the roof of a house in 1 buffer, so i can tile a roof texture, but this would only be like 20 polys... this is the reason i implemented dynamic buffers c) other suggestions along tiling textures (this is the thing i am after to get good texture quality) thanks....
Fidelio66
Fidelio66
You can lock the buffer with D3DLOCK_DISCARD, which will give you a new memory pointer and will let the card continue drawing, it doesn''t wait until drawing is finished.
If you do
beginscene
draw
endscene
lock-fill-unlock
present
it should be faster as the card can still draw while you are filling it again for the next frame.
supagu
supagu
i have tried lock_discard, doesnt have much of a difference over nooverwrite.
its the copying thats the problem really, it just takes so long

Topic Locked

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

Sign in to reply to this topic.