Jump to content

  • Log In with Google      Sign In   
  • Create Account


D3D11 custom texture loader


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 KingofNoobs   Members   -  Reputation: 301

Like
0Likes
Like

Posted 16 November 2012 - 05:06 AM

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

I wonder as I wander...

http://www.davesgameoflife.com


Sponsor:

#2 Auskennfuchs   Members   -  Reputation: 514

Like
0Likes
Like

Posted 16 November 2012 - 08:56 AM

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.

http://www.gamedev.net/topic/596487-d3dx11-and-tga/

Edited by Auskennfuchs, 16 November 2012 - 09:05 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS