Hi guys! Here I show part of my work... http://rapidshare.com/files/277312291/D ... I.nds.html
The problem is that I want to animate through the palette, the marquee lights of the scenary ... and do not know
Someone who has done with 3D, please tell me... thank
Palette with 3D
Re: Palette with 3D
it is really just a matter of updating the palette in vram. you will need to switch the vram bank to LCD mode, update the palette, then switch the bank back to texture palette. one small caveat is that you probably want to do this during vblank as you can get black lines on the screen if the vram bank is actively being used.
you can use this function to upload the new palette
where addr is the value returned from
these functions take care of the vram bank switch, but I gave the background info so you would understand the black lines.
you can use this function to upload the new palette
Code: Select all
void glTexLoadPal(const u16* pal, u16 count, u32 addr) {
Code: Select all
int gluTexLoadPal(const u16* pal, u16 count, uint8 format) {
-
- Posts: 9
- Joined: Tue Aug 18, 2009 2:29 pm
Re: Palette with 3D
Yeah, well i planned to use glTexLoadPal, but not how to use it, there are no examples or clear references to its use ...
Parameters:
...
and
Loads a palette into the next available palette slot, returns the addr on success or -1.
Parameters:
Parameters:
- pal pointer to the palette to load [OK]
count the size of the palette [OK]
addr the offset in VRAM to load the palette <--- gluTexLoadPal
elhobbs wrote:where addr is the value returned from
Code: Select all
int gluTexLoadPal(const u16* pal, u16 count, uint8 format)
and
Loads a palette into the next available palette slot, returns the addr on success or -1.
Parameters:
- pal pointer to the palette to load [OK]
count the size of the palette [OK]
format the format of the texture ... sorry, but this has to do?
Who is online
Users browsing this forum: No registered users and 2 guests