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 > DS Texture question, concerning wrapping, or so to speak

#104903 - DiscoStew - Tue Oct 03, 2006 11:44 pm

Now, I know the DS is capable of texture wrapping with the flags GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, but after having looked a little of what the N64 was capable of doing with textures, I wanted to ask something concerning the texture capabilities of the DS.

On the N64, for certain textures onto polygon(s), it is capable of mapping the texture once and not wrapped, but any area left untextured on a polygon was covered with the edge-most pixels of the texture, like the edge is smeared horizontally or vertically across the remaining space.

I just wanted to know if this were possible on the DS, since I don't wish to neither resort to making textures big, nor wrapping them when I only want one single instance of the texture on the polygon(s).

I hope what I said is understandable.
_________________
DS - It's all about DiscoStew

#104908 - DiscoStew - Wed Oct 04, 2006 1:25 am

Sigh....now I really feel silly.

It seems that if I'm NOT using the Wrap flags, it does it automatically. Heh, I was using a texture that I forgot had a black outlining, and since I had nothing else in the scene, it blended right in with the emptyness of everything else. I didn't realize it was doing it already, until I edited the texture on the edges myself.

This brings up something else though. What if I want to have the polygon have a texture on it, except that everything around that texture is see-through? Before I discovered the "smearing", I thought it was doing this already, but I assumed wrong. Also, what about if I wanted to create holes in the texture? I assume for that, I would require a texture that runs off a palette, not direct color, kinda like tile cels and palettes in 2D, right?
_________________
DS - It's all about DiscoStew

#104914 - tepples - Wed Oct 04, 2006 3:34 am

To knock holes in a direct color texture, change the alpha bit.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#104918 - DiscoStew - Wed Oct 04, 2006 5:38 am

lol, simple as that, eh?

Just checked the mode bits for textures. I'd need to change the setting to RGBA for that to work, but I'd also need to set that last bit somehow in the image for each pixel.

Guess I could also use this method for making the texture show up with having all surrounding areas cleared, if I changed the alpha bit for each pixel on the edges of the texture. I'm sure there is a better way for that without losing those edges. I just haven't found it yet.

I just need to tinker around with these things a bit more.
_________________
DS - It's all about DiscoStew