openMSX
DirectScalerOutput.hh
Go to the documentation of this file.
1 #ifndef DIRECTSCALEROUTPUT_HH
2 #define DIRECTSCALEROUTPUT_HH
3 
4 #include "ScalerOutput.hh"
5 #include "SDLOutputSurface.hh"
6 
7 namespace openmsx {
8 
9 template<typename Pixel>
10 class DirectScalerOutput final : public ScalerOutput<Pixel>
11 {
12 public:
13  explicit DirectScalerOutput(SDLOutputSurface& output);
14 
15  unsigned getWidth() const override;
16  unsigned getHeight() const override;
17  Pixel* acquireLine(unsigned y) override;
18  void releaseLine(unsigned y, Pixel* buf) override;
19  void fillLine (unsigned y, Pixel color) override;
20 
21 private:
22  SDLOutputSurface& output;
23  SDLDirectPixelAccess pixelAccess;
24 };
25 
26 } // namespace openmsx
27 
28 #endif
openmsx::DirectScalerOutput::DirectScalerOutput
DirectScalerOutput(SDLOutputSurface &output)
Definition: DirectScalerOutput.cc:10
openmsx::DirectScalerOutput::getWidth
unsigned getWidth() const override
Definition: DirectScalerOutput.cc:16
openmsx::DirectScalerOutput
Definition: DirectScalerOutput.hh:10
openmsx::ScalerOutput
Definition: Scaler.hh:8
openmsx::Pixel
uint32_t Pixel
Definition: GLHQLiteScaler.cc:93
openmsx::DirectScalerOutput::fillLine
void fillLine(unsigned y, Pixel color) override
Definition: DirectScalerOutput.cc:40
openmsx::DirectScalerOutput::getHeight
unsigned getHeight() const override
Definition: DirectScalerOutput.cc:22
ScalerOutput.hh
SDLOutputSurface.hh
openmsx::SDLOutputSurface
A frame buffer where pixels can be written to.
Definition: SDLOutputSurface.hh:29
openmsx::DirectScalerOutput::releaseLine
void releaseLine(unsigned y, Pixel *buf) override
Definition: DirectScalerOutput.cc:34
openmsx::DirectScalerOutput::acquireLine
Pixel * acquireLine(unsigned y) override
Definition: DirectScalerOutput.cc:28
openmsx::SDLDirectPixelAccess
Definition: SDLOutputSurface.hh:10
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5