ID3DXSprite?

Started by
11 comments, last by Trip99 19 years, 8 months ago
Quote:Original post by andyb716
Alright I got something to display on the screen. And what do you mean use a single instance, just use the draw() function for every texture I have?


Yes - as others say the sprite object just provides a set of interfaces so only one is needed and in fact you get better performance using just one. I have a page on using DX sprites you might be interested in here:
Sprites
------------------------See my games programming site at: www.toymaker.info
Advertisement
So from reading your tutorial, say I have a texture which is 128*128. If I want this texture to work as a banner across my screen (and I'm assuming sprites measure in pixels not logical coords), is there anyway for me to resize it to say 1024 width by 64 height, or does the interface require the texture to be rendered as a squared texture?

Thanks,

Permafried-
No it does not need to be square but each dimension should be a power of 2 (video card limitation). To stretch it you could scale it - look in my advanced notes - using the SetTransform function. How good it will look though I am not sure.
------------------------See my games programming site at: www.toymaker.info

This topic is closed to new replies.

Advertisement