openMSX
Rasterizer.hh
Go to the documentation of this file.
1#ifndef RASTERIZER_HH
2#define RASTERIZER_HH
3
4#include "EmuTime.hh"
5#include "DisplayMode.hh"
6
7namespace openmsx {
8
9class PostProcessor;
10class RawFrame;
11
13{
14public:
15 virtual ~Rasterizer() = default;
16
18 [[nodiscard]] virtual PostProcessor* getPostProcessor() const = 0;
19
25 virtual bool isActive() = 0;
26
29 virtual void reset() = 0;
30
34 virtual void frameStart(EmuTime::param time) = 0;
35
39 virtual void frameEnd() = 0;
40
44 virtual void setDisplayMode(DisplayMode mode) = 0;
45
52 virtual void setPalette(unsigned index, int grb) = 0;
53
57 virtual void setBackgroundColor(byte index) = 0;
58
59 virtual void setHorizontalAdjust(int adjust) = 0;
60 virtual void setHorizontalScrollLow(byte scroll) = 0;
61 virtual void setBorderMask(bool masked) = 0;
62 virtual void setTransparency(bool enabled) = 0;
63 virtual void setSuperimposeVideoFrame(const RawFrame* videoSource) = 0;
64
72 virtual void drawBorder(int fromX, int fromY, int limitX, int limitY) = 0;
73
82 virtual void drawDisplay(
83 int fromX, int fromY,
84 int displayX, int displayY,
85 int displayWidth, int displayHeight) = 0;
86
98 virtual void drawSprites(
99 int fromX, int fromY,
100 int displayX, int displayY,
101 int displayWidth, int displayHeight) = 0;
102
105 [[nodiscard]] virtual bool isRecording() const = 0;
106
107protected:
108 Rasterizer() = default;
109};
110
111} // namespace openmsx
112
113#endif
Represents a VDP display mode.
A post processor builds the frame that is displayed from the MSX frame, while applying effects such a...
virtual void reset()=0
Resynchronize with VDP: all cached states are flushed.
virtual void drawBorder(int fromX, int fromY, int limitX, int limitY)=0
Render a rectangle of border pixels on the host screen.
virtual ~Rasterizer()=default
virtual void setHorizontalScrollLow(byte scroll)=0
virtual void setBorderMask(bool masked)=0
virtual void frameEnd()=0
Indicates the end of the current frame.
virtual void setHorizontalAdjust(int adjust)=0
virtual void setSuperimposeVideoFrame(const RawFrame *videoSource)=0
virtual void setBackgroundColor(byte index)=0
Changes the background color.
virtual PostProcessor * getPostProcessor() const =0
See VDP::getPostProcessor().
virtual void frameStart(EmuTime::param time)=0
Indicates the start of a new frame.
virtual void setDisplayMode(DisplayMode mode)=0
Precalc several values that depend on the display mode.
virtual void setPalette(unsigned index, int grb)=0
Change an entry in the palette.
virtual void setTransparency(bool enabled)=0
virtual bool isActive()=0
Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not...
virtual bool isRecording() const =0
Is video recording active?
virtual void drawSprites(int fromX, int fromY, int displayX, int displayY, int displayWidth, int displayHeight)=0
Render a rectangle of sprite pixels on the host screen.
virtual void drawDisplay(int fromX, int fromY, int displayX, int displayY, int displayWidth, int displayHeight)=0
Render a rectangle of display pixels on the host screen.
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition RawFrame.hh:16
This file implemented 3 utility functions:
Definition Autofire.cc:11