Sign in to follow this  

D3D11 custom texture loader

Recommended Posts

KingofNoobs    305
Hello all,

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?

-Dave Ottley

Share this post

Link to post
Share on other sites
Auskennfuchs    1032
You can use an external imagelibrary like freeimage to load your textures.
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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this