1 #ifndef SDLRASTERIZER_HH
2 #define SDLRASTERIZER_HH
26 template<
typename Pixel>
36 std::unique_ptr<PostProcessor> postProcessor);
41 [[nodiscard]]
bool isActive()
override;
42 void reset()
override;
53 void drawBorder(
int fromX,
int fromY,
int limitX,
int limitY)
override;
56 int displayX,
int displayY,
57 int displayWidth,
int displayHeight)
override;
60 int displayX,
int displayY,
61 int displayWidth,
int displayHeight)
override;
65 inline void renderBitmapLine(
Pixel* buf,
unsigned vramLine);
75 void precalcPalette();
81 void precalcColorIndex0(
DisplayMode mode,
bool transparency,
82 const RawFrame* superimposing,
byte bgcolorIndex);
85 std::pair<Pixel, Pixel> getBorderColors();
88 void update(
const Setting& setting) noexcept
override;
106 const std::unique_ptr<PostProcessor> postProcessor;
110 std::unique_ptr<RawFrame> workFrame;
140 Pixel palFg[16 * 2], palBg[16];
144 Pixel palGraphic7Sprites[16];
149 Pixel V9938_COLORS[8][8][8];
154 Pixel PALETTE256[256];
158 Pixel V9958_COLORS[32768];
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
SDLRasterizer & operator=(const SDLRasterizer &)=delete
void setPalette(int index, int grb) override
Change an entry in the palette.
void setHorizontalAdjust(int adjust) override
void setBackgroundColor(int index) override
Changes the background color.
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 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: