#171938 - headspin - Sun Jan 03, 2010 12:13 pm
I am trying to setup 4 different colored lights to light up a 2d level made of quads.
Here is the light code from the Display_List_2 libnds example
I cannot seem to get the coloured effect I'm looking for. Something like [Images not permitted - Click here to view it] but probably a bit subtler.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
Here is the light code from the Display_List_2 libnds example
Code: |
glLight(0, RGB15(31,31,31), 0, floattov10(-1.0), 0);
glLight(1, RGB15(31,0,0), 0, floattov10(1) - 1, 0); glLight(2, RGB15(0,31,0), floattov10(-1.0), 0, 0); glLight(3, RGB15(0,0,31), floattov10(1.0) - 1, 0, 0); //need to set up some material properties since DS does not have them set by default glMaterialf(GL_AMBIENT, RGB15(16, 16, 16)); glMaterialf(GL_DIFFUSE, RGB15(16, 16, 16)); glMaterialf(GL_SPECULAR, BIT(15) | RGB15(8, 8, 8)); glMaterialf(GL_EMISSION, RGB15(16, 16, 16)); |
I cannot seem to get the coloured effect I'm looking for. Something like [Images not permitted - Click here to view it] but probably a bit subtler.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game