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 
7 namespace openmsx {
8 
9 class PostProcessor;
10 class RawFrame;
11 
13 {
14 public:
15  virtual ~Rasterizer() = default;
16 
18  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(int index, int grb) = 0;
53 
57  virtual void setBackgroundColor(int 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  virtual bool isRecording() const = 0;
106 
107 protected:
108  Rasterizer() = default;
109 };
110 
111 } // namespace openmsx
112 
113 #endif
virtual void setHorizontalAdjust(int adjust)=0
virtual void setTransparency(bool enabled)=0
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
Represents a VDP display mode.
Definition: DisplayMode.hh:14
virtual bool isActive()=0
Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not...
virtual ~Rasterizer()=default
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
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.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
virtual void setPalette(int index, int grb)=0
Change an entry in the palette.
virtual void frameEnd()=0
Indicates the end of the current frame.
Abstract base class for post processors.
virtual void reset()=0
Resynchronize with VDP: all cached states are flushed.
virtual void setBackgroundColor(int index)=0
Changes the background color.
virtual void setHorizontalScrollLow(byte scroll)=0
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.
virtual void setDisplayMode(DisplayMode mode)=0
Precalc several values that depend on the display mode.
virtual void drawBorder(int fromX, int fromY, int limitX, int limitY)=0
Render a rectangle of border pixels on the host screen.
virtual void setBorderMask(bool masked)=0
virtual void frameStart(EmuTime::param time)=0
Indicates the start of a new frame.
virtual void setSuperimposeVideoFrame(const RawFrame *videoSource)=0
virtual bool isRecording() const =0
Is video recording active?
virtual PostProcessor * getPostProcessor() const =0
See VDP::getPostProcessor().