gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Textures for 3d

#100362 - xexamedes - Sun Aug 27, 2006 3:09 pm

Hi! I'm going slowly nuts trying to understand how to take a picture and use as a "background" on a large QUAD in the ersatz openGl.

I've begun with a small 256x256 8-bit bmp, which I run through gfx2gba, to produce a .raw file.

I have assumed that this raw file is tha same as a .bin files in the PALib and other examples, but have found no proof of this. The gfx2gba cheerfully informs me of the fact that it can be make several kinds of output, but bin isn't one of the hidden accepted values.

I then barely manage to make GPgfx to make a couple of .h/.c files out of the raw file which contains lots of interresting content and looks like something good is on the way.

Then I manage to actaully (I think) load the texture with PA_LoadTexture, and then map the texture onto a QUAD I put a bit away from the main action.

I've earlier managed to modify a texture to my own ends from a PALib example and used it for all my other quads on screen. I'm making something similar to the 3d/gl super mario bros for DS.

And the result of my bakground is horrendous. I get a lot of different pixels up in one corner and then straight colored lines running both right and down from it.

My assumption here is that I need some more flags to gfx2gba to make it do happy shiny sommersaults.

Has anyone some more info on this?
Thanks!

PS

#100395 - Lick - Sun Aug 27, 2006 6:05 pm

Firstly, try out your code with the premade .bins of the library. This way, you at least know that your code works.
Second, try using git.exe (from TONC). It's far better than any graphics converter I ever used for GBA/DS homebrew.
_________________
http://licklick.wordpress.com

#100423 - Sausage Boy - Sun Aug 27, 2006 8:51 pm

I'm working on a texture conversion tool, in the meantime, try
gfx2gba -c32k

The DS supports many different texture types, this will create a standard RGB texture, which seems to be most common in the examples. It's, however, the largest type as well, so you may not want to use it in your final version. I have no idea what format PALib uses, but this will most likely work.
_________________
"no offense, but this is the gayest game ever"