Skip to main content
gamedev.net
🔒 Locked

ID3DXSprite Optimisation

Started by Motorherp Mar 19, 2005 at 12:12 PM 2 replies 950+ views
Original Post
Motorherp
Motorherp
Hi. Does anyone know if DX internally sorts ID3DXSprite::Draw(..) calls to minimise texture changes if many calls are made inside the same ID3DXSprite::Begin() ID3DXSprite::End() pair? Its just that I've already created my own sorter but it just occured to me that this could actually slow the program down if DX handles this for me already. Many thanks
[size="1"] [size="4"]:: SHMUP-DEV ::
turnpast
turnpast
There are three flags that you can pass to Begin that control how sprites are sorted:

D3DXSPRITE_SORT_DEPTH_BACKTOFRONT
D3DXSPRITE_SORT_DEPTH_FRONTTOBACK
D3DXSPRITE_SORT_TEXTURE

I believe that the flags are exclusive, but the docs don't seem to say so. It should be obvious what they do.
Motorherp
Motorherp
So much for my own sorter then :/

Is D3DXSPRITE_SORT just a feature of the latest DX9 though because I'm using a slightly older version and can't find anything about it in the docs? Suppose its about time I downloaded the latest version anywho. Thanks for the help
[size="1"] [size="4"]:: SHMUP-DEV ::
circlesoft
circlesoft
Quote:
Original post by Motorherp
So much for my own sorter then :/

Is D3DXSPRITE_SORT just a feature of the latest DX9 though because I'm using a slightly older version and can't find anything about it in the docs? Suppose its about time I downloaded the latest version anywho. Thanks for the help

Throughout the development of DX8 and DX9, ID3DXSprite (like many of the D3DX interfaces) has gone through many changes and overhauls to increase performance. It's quite possible that this functionality was added after the version your using was released.

Topic Locked

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

Sign in to reply to this topic.