Members - Reputation: 301
Posted 16 November 2012 - 05:06 AM
I am writing a multiplatform rendering engine (so metro and Win8 must be possibilities) so I don't want to use D3DX texture loaders for my engine. Also, I intend to use a special file format for all my texture data that will include data on individual sprites, frames, and animations so that loading one texture (I call it an altas, because that's really what it is) will populate all the sprite and animation data that I will need for a level, leaving me with the simple task of creating sprite instances in a level editor to create game content.
The problem is, I've never written a parser or a texture loader and I was wondering if anybody knew of any good tutorials for doing the same? I know I could throw all the data into a second file and just parse that, but I don't want to have to bother with naming and storing and keeping track of double the files. I want to eventually create a GUI based level editor that will simply create an atlas file with all sprite and animation info, and another file with sprite instance information (call this the level file). I might even want to integrate those two files into one down the road (which would not be hard at all, it would just involve integrating the two types of parsers into one).
So, does anyone know of any good tutorials on how to create a D3D11 texture loader. I basically need to know how the RGBA data is stored in the d3d texture so I can simply create a memory layout of the texture as D3D needs it and then send that to VRAM...??? Actually I'm not sure what I need to do but I think it will be something like that. Does anyone know of a good place to start?
I wonder as I wander...
Members - Reputation: 523
Posted 16 November 2012 - 08:56 AM
I'm using this and had found a good snippet in this forum, where you can see, how the texture is created and filled with image-data.
Edited by Auskennfuchs, 16 November 2012 - 09:05 AM.