I want to know that is there any way of resizing our texture to the size of a sprite in slimdx direct3d9 or directx9. That is if my image size is 1024x768 and sprite size is 500x500, how can i resize the image in slimdx to display it fully on the sprite without any cropping.
How to resize an image according to the size of a sprite in directx or slimdx
Started by Yash14, Oct 01 2011 01:43 AM
1 reply to this topic
Sponsor:
#2 Crossbones+ - Reputation: 5164
Posted 01 October 2011 - 01:50 AM
Make a standard quad or 2-triangle strip with UV coordinates:
Draw at:
L. Spiro
[0,0]----[1,0] | | | | [0,1]----[1,1]
Draw at:
[X,Y]-----------[X+500,Y] | | | | [X,Y+500]----[X+500,Y+500]
L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums






