Skip to main content
GameDev.net gamedev.net
🔒 Locked

Managed DirectX Sprites

Started by Synex Mar 6, 2004 at 2:57 PM 0 replies 400+ views
Original Post
Synex
Synex
I''m having a big problemo! I''ve got a texture that contains 128 different smaller ''sprites'' in it. I''m using the Microsoft.DirectX.Direct3D.Sprite class to render these. However, if I set the ''srcRectangle'' property to one of the sprites in the middle of the texture for example (x, y, width, height) = (25, 32, 64, 64), it throws up an exception. When i render the sprite as (0, 0, 64, 64) it''s fine tho! I''m well confused - Any ideas? Synex
SynexCode Monkey
Possibility
Possibility
I wonder if the dimensions have to be factors of 2, try rendering with 32,32,64,64 instead of the 25.

Possibilityer

Topic Locked

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

Sign in to reply to this topic.