Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am making an application interface which uses resizable 'windows'.

I'm using the DX9 DXGI sprite and can't find much info on optimised sprite use.

I have read about texture clamping and that seems to be what I need but sprites use a RECT inplace of texture co-ordinates, so I have assumed that clamping is only for rendering primitives.

Is the best way to draw resizable stuff to have an image at the maximum length in the texture and just use the length needed in the sprite, or use say a 1 pixel wide sample and repeat it for the length needed.

Seems the first option is best, but directx may have some optimisations for using the same areas of a texture multiple times.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900