Fixed glares

This commit is contained in:
2012-06-14 03:11:36 +00:00
parent cc82653b72
commit fac417a3ba
10 changed files with 155 additions and 102 deletions

View File

@@ -141,6 +141,16 @@ void MemoryBuffer::writePixel(int x, int y, const float color[4])
}
}
void MemoryBuffer::addPixel(int x, int y, const float color[4])
{
if (x >= this->rect.xmin && x < this->rect.xmax &&
y >= this->rect.ymin && y < this->rect.ymax)
{
const int offset = (this->chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
add_v4_v4(&this->buffer[offset], color);
}
}
void MemoryBuffer::readCubic(float result[4], float x, float y)
{
int x1 = floor(x);