• Advertisement
Sign in to follow this  
  • entries
    455
  • comments
    639
  • views
    423787

GTL Part 3 : Progress!

Sign in to follow this  

98 views

Its taken a little longer than I had first planned however I've finally got an inital version of the Game Texture Loader working, it currently only loads bitmaps but thats fine as I was mainly doing it as a proof of concept and learning experiance for the boost::iostreams library.

Anyways, the IOstreams library is pretty much perfect for what I want todo, the basic setup being;

  • Create filtering stream object

  • Work out which file format we are dealing with and push the correct filtering object into the stream

  • Push a file reading object into the stream

  • Read the data in


When we push the filtering object into the stream we pass it a reference to a structure into which the header is decoded before we start returning decoded data. This means that the loading loop is just a reading loop, however we are garrenteed to have the header decoded first as such we can use this data while decoding (such as setting the correct size of the final data buffer).

So, the basic framework is in place and I've got a test program which shows that the bitmap decoder does infact work. So, what I have todo now is make the filtering objects for the various file formats, after that I can refactor the internals so that things are a little saner.

I'm also considering making a templated version, I'm pretty sure various bits could be swapped about so that I can compile time dispatch some things (mostly related to the texture types). However this is low on my 'todo' list and needs some more investigation.

More soon I hope [smile]
Sign in to follow this  


1 Comment


Recommended Comments

You wouldn't be willing to post a project with these initial results? I'd love to take a look at how you're interacting with that boost library.

Share this comment


Link to comment

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

  • Advertisement