forked from Makuna/NeoPixelBus
Render incorrectly converts to color object when not needed (#528)
This commit is contained in:
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
// required for a shader object, it will be called for
|
||||
// every pixel
|
||||
void Apply(uint16_t index, uint8_t* pDest, uint8_t* pSrc)
|
||||
void Apply(uint16_t index, uint8_t* pDest, const uint8_t* pSrc)
|
||||
{
|
||||
// we don't care what the index is so we ignore it
|
||||
//
|
||||
|
@@ -144,11 +144,10 @@ public:
|
||||
|
||||
for (uint16_t indexPixel = 0; indexPixel < countPixels; indexPixel++)
|
||||
{
|
||||
typename T_BUFFER_METHOD::ColorObject color;
|
||||
const uint8_t* pSrc = T_BUFFER_METHOD::ColorFeature::getPixelAddress(_method.Pixels(), indexPixel);
|
||||
uint8_t* pDest = T_BUFFER_METHOD::ColorFeature::getPixelAddress(destBuffer.Pixels, indexPixel);
|
||||
|
||||
shader.Apply(indexPixel, (uint8_t*)(&color), _method.Pixels() + (indexPixel * _method.PixelSize()));
|
||||
|
||||
T_BUFFER_METHOD::ColorFeature::applyPixelColor(destBuffer.Pixels, indexPixel, color);
|
||||
shader.Apply(indexPixel, pDest, pSrc);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user