Update SDKSample to use SMX_SetLights2 and set the new panel lights.
This commit is contained in:
parent
c53c3d45c6
commit
ec848441d7
@ -53,10 +53,13 @@ public:
|
|||||||
bool bLight = iPanel == iPanelToLight && iPad == 0;
|
bool bLight = iPanel == iPanelToLight && iPad == 0;
|
||||||
if( !bLight )
|
if( !bLight )
|
||||||
{
|
{
|
||||||
for( int iLED = 0; iLED < 16; ++iLED )
|
// We're not lighting this panel, so append black for the 4x4 and 3x3 lights.
|
||||||
|
for( int iLED = 0; iLED < 25; ++iLED )
|
||||||
addColor( 0, 0, 0 );
|
addColor( 0, 0, 0 );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Append light data for the outer 4x4 grid of lights.
|
||||||
addColor( 0xFF, 0, 0 );
|
addColor( 0xFF, 0, 0 );
|
||||||
addColor( 0xFF, 0, 0 );
|
addColor( 0xFF, 0, 0 );
|
||||||
addColor( 0xFF, 0, 0 );
|
addColor( 0xFF, 0, 0 );
|
||||||
@ -73,10 +76,22 @@ public:
|
|||||||
addColor( 0xFF, 0xFF, 0 );
|
addColor( 0xFF, 0xFF, 0 );
|
||||||
addColor( 0xFF, 0xFF, 0 );
|
addColor( 0xFF, 0xFF, 0 );
|
||||||
addColor( 0xFF, 0xFF, 0 );
|
addColor( 0xFF, 0xFF, 0 );
|
||||||
|
|
||||||
|
// Append light data for the inner 3x3 grid of lights, if present. These
|
||||||
|
// are ignored if the platform doesn't have them.
|
||||||
|
addColor( 0xFF, 0, 0 );
|
||||||
|
addColor( 0xFF, 0, 0 );
|
||||||
|
addColor( 0xFF, 0, 0 );
|
||||||
|
addColor( 0, 0xFF, 0 );
|
||||||
|
addColor( 0, 0xFF, 0 );
|
||||||
|
addColor( 0, 0xFF, 0 );
|
||||||
|
addColor( 0, 0, 0xFF );
|
||||||
|
addColor( 0, 0, 0xFF );
|
||||||
|
addColor( 0, 0, 0xFF );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SMX_SetLights( sLightsData.data() );
|
SMX_SetLights2( sLightsData.data(), sLightsData.size() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user