Original Post
Hi I recently bought Beginning DirectX 9. It's not bad, although I'm currently only at Chapter 3. I'm am sorta dissapointed in the fact that she doesn't cover ID3DXSprite or ID3DXFont (seeing that this book is intended for beginners). Anyway, in the book she does her sprite routines via an offscreen surface that she StretchRect() to the backsurface. What I like about her methods is that she has all her textures in one file and specifies the RECT area of the one that she needs and copies only the parts she needed. (Hope you understand that last part) I'm busy writing a small 2D game for the experience of it. However, I have decided to go the ID3DXSprite path. I like the fact that I can use transforms. I was wondering how would be the best way to go. Currently, I see no way of using a single bitmapped file for my textures without using an offscreen surface. Because ID3DXSprite only accepts Textures (not surfaces) and what I have seen from ID3DX interface I see no way that ID3DXCreateTextureFromFileEx can accept a RECT for clipping a certain section in a file. (Correct me if I'm wrong) So currently all my textures are in different files. Now the questions: Q1: Is it possible to use a single file for ID3DXSprite and how? Q2: What would be the best method to use, IF both was possible; single file or multiple file (I'm voting single, less file access, however, might have to manage your memory more carefully) Thanks Talib