How do I set a certain color like black to be transparent with a 16bit Bitmap?
Do I use GL_TEXTURE_COLOR0_TRANSPARENT?
There's no example that illustrates this in the libnds examples folder.
16bit Bitmap Transparency
Re: 16bit Bitmap Transparency
GL_TEXTURE_COLOR0_TRANSPARENT is for paletted textures only. for 16bit texture formats you need to use the alpha bit - bit 15.
Re: 16bit Bitmap Transparency
OK thanks.
So I need to add a certain parameter to my *.grit file for the alpha bit?
So I need to add a certain parameter to my *.grit file for the alpha bit?
Re: 16bit Bitmap Transparency
have you tried putting an alpha channel in your source images? have you tried looking at the grit options such as
-gT{n} Transparent color; rrggbb hex or 16bit BGR hex [FF00FF]
which seem to describe what you want?
-gT{n} Transparent color; rrggbb hex or 16bit BGR hex [FF00FF]
which seem to describe what you want?
-
- Posts: 23
- Joined: Thu Sep 09, 2010 1:28 pm
- Location: Australia
- Contact:
Re: 16bit Bitmap Transparency
So you want ColourKey transparency? so basically:habababa wrote:How do I set a certain color like black to be transparent with a 16bit Bitmap?
Do I use GL_TEXTURE_COLOR0_TRANSPARENT?
There's no example that illustrates this in the libnds examples folder.
A = 0 = RGB(0,0,0)
Where Alpha is equal to 0 if the RGB components are all 0 (black)
You can loop through your texture bitmap array and process each 16-bit value, if the RGB bits are all 0 then you can set bit 15 to 0 otherwise bit 15 would be 1
Move over Mario... and cruise by Crash... Croc Rocks!
It's a serious adventure 3D platformer for all retro gamers to drool over =D
It's a serious adventure 3D platformer for all retro gamers to drool over =D
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests