BGRA format
We're getting there.
I've just added to my Builder app so I can now save or load individual frames in what I am probably a bit pathetically calling .BGR files, which are basically the width and height of the image as ints, then the colour and alpha information as bytes in the order blue, green, red and alpha.
I've just added a function to my D3D library that will load a single .BGR file onto a texture and I've confirmed that it displays correctly and the alpha works okay.
So I now know that if I can get my texture organising system to work, I'll be able to have an interface where I can randomly throw my multiple image sprite files at a texture and have it arrange them in a reasonably efficient order and return the tu and tv co-ordinates.
I've decided that I need to get this working before I attempt even the simple game I mentioned below since otherwise I'll have to either hard-code or load in a load of rectangle information and that will get on my nerves.
So now I've confirmed that I can load this BGRA information directly onto a texture, the next step is to develop the system described above and below. I'm also going to need to be able to dump the texture to a file to confirm that it is working, but now I can just dump it in my BGR format, open it with my Sprite app, save it as a bitmap then open it with PSP and examine it correctly.
I've just added to my Builder app so I can now save or load individual frames in what I am probably a bit pathetically calling .BGR files, which are basically the width and height of the image as ints, then the colour and alpha information as bytes in the order blue, green, red and alpha.
I've just added a function to my D3D library that will load a single .BGR file onto a texture and I've confirmed that it displays correctly and the alpha works okay.
So I now know that if I can get my texture organising system to work, I'll be able to have an interface where I can randomly throw my multiple image sprite files at a texture and have it arrange them in a reasonably efficient order and return the tu and tv co-ordinates.
I've decided that I need to get this working before I attempt even the simple game I mentioned below since otherwise I'll have to either hard-code or load in a load of rectangle information and that will get on my nerves.
So now I've confirmed that I can load this BGRA information directly onto a texture, the next step is to develop the system described above and below. I'm also going to need to be able to dump the texture to a file to confirm that it is working, but now I can just dump it in my BGR format, open it with my Sprite app, save it as a bitmap then open it with PSP and examine it correctly.
0
Sign in to follow this
Followers
0
0 Comments
Recommended Comments
There are no comments to display.
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 accountSign in
Already have an account? Sign in here.
Sign In Now