openMSX
LDSDLRasterizer.hh
Go to the documentation of this file.
1 #ifndef LDSDLRASTERIZER_HH
2 #define LDSDLRASTERIZER_HH
3 
4 #include "LDRasterizer.hh"
5 #include <SDL.h>
6 #include <memory>
7 
8 namespace openmsx {
9 
10 class VisibleSurface;
11 class RawFrame;
12 class PostProcessor;
13 
17 template <class Pixel>
18 class LDSDLRasterizer final : public LDRasterizer
19 {
20 public:
22  VisibleSurface& screen,
23  std::unique_ptr<PostProcessor> postProcessor);
24  ~LDSDLRasterizer() override;
25 
26  // Rasterizer interface:
27  PostProcessor* getPostProcessor() const override;
28  void frameStart(EmuTime::param time) override;
29  void drawBlank(int r, int g, int b) override;
30  RawFrame* getRawFrame() override;
31 
32 private:
36  const std::unique_ptr<PostProcessor> postProcessor;
37 
40  std::unique_ptr<RawFrame> workFrame;
41 
42  const SDL_PixelFormat pixelFormat;
43 };
44 
45 } // namespace openmsx
46 
47 #endif
void drawBlank(int r, int g, int b) override
PostProcessor * getPostProcessor() const override
Rasterizer using a frame buffer approach: it writes pixels to a single rectangular pixel buffer...
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
LDSDLRasterizer(VisibleSurface &screen, std::unique_ptr< PostProcessor > postProcessor)
An OutputSurface which is visible to the user, such as a window or a full screen display.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
RawFrame * getRawFrame() override
int g
Abstract base class for post processors.
void frameStart(EmuTime::param time) override