AntonioND / nitro-engine

3D engine for the Nintendo DS
154 stars 12 forks source link

Any examples for pallets? #4

Closed JustMeDaFaq closed 2 years ago

JustMeDaFaq commented 2 years ago

Hi, are there any examples for how to use pallets? Like when using RGB256 for textures?

Couldnt find any in the example folders :)

JustMeDaFaq commented 2 years ago

NVM, if someone needs:

    NE_Palette* palette = NE_PaletteCreate();
    NE_PaletteLoad(palette,(u16 *) Texture256_pal_bin,256,GL_RGB256);
    NE_MaterialTexSetPal(Material,palette);
AntonioND commented 2 years ago

https://github.com/AntonioND/nitro-engine/tree/5850ae5d5998e08681e1248771f25a775503dab6/examples/loading/paletted_texture

This example should show how that works.