void PEffectGlow::renderEffect(PRenderState *renderState) { for (pint32 i = 0; i < m_blurIterations; ++i) { // blur in x direction. m_xMaterial->parameter("texture") = readFrameBuffer()->colorBuffer(); m_xMaterial->apply(renderState); renderState->useFrameBuffer(writeFrameBuffer()); PGlFramebuffer::clearFramebuffer(true, false, false); m_effectRect->render(renderState); swapFrameBuffers(); // blur in y direction. m_yMaterial->parameter("texture") = readFrameBuffer()->colorBuffer(); m_yMaterial->apply(renderState); renderState->useFrameBuffer(writeFrameBuffer()); PGlFramebuffer::clearFramebuffer(true, false, false); m_effectRect->render(renderState); swapFrameBuffers(); } }
void Display::putPixel(const Common::Point &p, byte color) { byte offset = p.x / 7; byte mask = 0x80 | (1 << (p.x % 7)); // Since white and black are in both palettes, we leave // the palette bit alone if ((color & 0x7f) == 0x7f || (color & 0x7f) == 0) mask &= 0x7f; // Adjust colors starting with bits '01' or '10' for // odd offsets if (offset & 1) { byte c = color << 1; if (c >= 0x40 && c < 0xc0) color ^= 0x7f; } writeFrameBuffer(p, color, mask); }
void Display::setPixelPalette(const Common::Point &p, byte color) { writeFrameBuffer(p, color, 0x80); }
void Display::setPixelBit(const Common::Point &p, byte color) { writeFrameBuffer(p, color, 1 << (p.x % 7)); }