1#ifndef SDLRASTERIZER_HH
2#define SDLRASTERIZER_HH
28template<std::
unsigned_
integral Pixel>
38 std::unique_ptr<PostProcessor> postProcessor);
43 [[nodiscard]]
bool isActive()
override;
44 void reset()
override;
48 void setPalette(
unsigned index,
int grb)
override;
55 void drawBorder(
int fromX,
int fromY,
int limitX,
int limitY)
override;
58 int displayX,
int displayY,
59 int displayWidth,
int displayHeight)
override;
62 int displayX,
int displayY,
63 int displayWidth,
int displayHeight)
override;
67 inline void renderBitmapLine(std::span<Pixel> buf,
unsigned vramLine);
77 void precalcPalette();
83 void precalcColorIndex0(
DisplayMode mode,
bool transparency,
84 const RawFrame* superimposing,
byte bgcolorIndex);
87 std::pair<Pixel, Pixel> getBorderColors();
108 const std::unique_ptr<PostProcessor> postProcessor;
112 std::unique_ptr<RawFrame> workFrame;
142 std::array<Pixel, 16 * 2> palFg;
143 std::array<Pixel, 16> palBg;
147 std::array<Pixel, 16> palGraphic7Sprites;
152 std::array<std::array<std::array<Pixel, 8>, 8>, 8> V9938_COLORS;
157 std::array<Pixel, 256> PALETTE256;
161 std::array<Pixel, 32768> V9958_COLORS;
Utility class for converting VRAM contents to host pixels.
Utility class for converting VRAM contents to host pixels.
Represents a VDP display mode.
Represents the output window/screen of openMSX.
Generic Gang-of-Four Observer class, templatized edition.
A frame buffer where pixels can be written to.
Abstract base class for post processors.
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Class containing all settings for renderers.
Rasterizer using a frame buffer approach: it writes pixels to a single rectangular pixel buffer.
void setHorizontalScrollLow(byte scroll) override
void setDisplayMode(DisplayMode mode) override
Precalc several values that depend on the display mode.
void setTransparency(bool enabled) override
void setHorizontalAdjust(int adjust) override
void setBackgroundColor(byte index) override
Changes the background color.
SDLRasterizer & operator=(const SDLRasterizer &)=delete
bool isRecording() const override
Is video recording active?
void drawDisplay(int fromX, int fromY, int displayX, int displayY, int displayWidth, int displayHeight) override
Render a rectangle of display pixels on the host screen.
void reset() override
Resynchronize with VDP: all cached states are flushed.
void setPalette(unsigned index, int grb) override
Change an entry in the palette.
void drawBorder(int fromX, int fromY, int limitX, int limitY) override
Render a rectangle of border pixels on the host screen.
~SDLRasterizer() override
void setSuperimposeVideoFrame(const RawFrame *videoSource) override
void frameEnd() override
Indicates the end of the current frame.
void frameStart(EmuTime::param time) override
Indicates the start of a new frame.
void setBorderMask(bool masked) override
bool isActive() override
Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not...
void drawSprites(int fromX, int fromY, int displayX, int displayY, int displayWidth, int displayHeight) override
Render a rectangle of sprite pixels on the host screen.
PostProcessor * getPostProcessor() const override
See VDP::getPostProcessor().
SDLRasterizer(const SDLRasterizer &)=delete
Utility class for converting VRAM contents to host pixels.
Manages VRAM contents and synchronizes the various users of the VRAM.
Unified implementation of MSX Video Display Processors (VDPs).
This file implemented 3 utility functions: