Batch calls for dx9

Use this board to discuss DirectX in general (not related to a specific issue with any of the books).

Batch calls for dx9

Postby Hieran_Del8 on Sun Jan 31, 2010 4:53 pm

Dx10 and 11 have a nifty DrawInstanced() command for drawing many instances of a primitive list. For example, a simple cube could be rendered 400 times with either 400 draw calls or 1 DrawInstanced() call with an array of 400 world transformations in a separate stream. Is there any sort of batch calling for dx9 primitive lists (like Flush() is for sprites)?
Hieran_Del8
 
Posts: 203
Joined: Fri Oct 03, 2008 12:18 pm
Location: Marengo, IL

Re: Batch calls for dx9

Postby admin on Thu Feb 04, 2010 10:51 am

When you ask, like "Flush" do you mean you want to wait for all current GPU commands to be flushed? Flush for sprites just draws the sprites that have been added to an internal buffer for drawing--basically, you keep a dynamic VB/IB and add to it, and then Flush would draw the contents you added to it.
admin
Site Admin
 
Posts: 42
Joined: Sat May 24, 2008 12:01 pm

Re: Batch calls for dx9

Postby Hieran_Del8 on Fri Feb 05, 2010 10:32 pm

Well, then Flush would be the wrong analogy. I'm basically looking for performance in drawing similar objects many times.
Hieran_Del8
 
Posts: 203
Joined: Fri Oct 03, 2008 12:18 pm
Location: Marengo, IL

Re: Batch calls for dx9

Postby Hieran_Del8 on Fri Feb 12, 2010 8:37 am

Oops! Turns out there is instancing for dx9, albeit the use of vs 3.0 is required. There's a sample respecting this in the dx sdk, utilizing IDirect3DDevice9::SetStreamSourceFrequency().
Hieran_Del8
 
Posts: 203
Joined: Fri Oct 03, 2008 12:18 pm
Location: Marengo, IL


Return to DirectX Board

Who is online

Users browsing this forum: No registered users and 1 guest

cron