OXYGENHUB
◆ main openmsx / src / video / ld / LDSDLRasterizer.hh
971 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#ifndef LDSDLRASTERIZER_HH
2
#define LDSDLRASTERIZER_HH
3
4
#include "LDRasterizer.hh"
5
#include <memory>
6
7
namespace openmsx {
8
9
class RawFrame;
10
class PostProcessor;
11
12
/** Rasterizer using a frame buffer approach: it writes pixels to a single
13
  * rectangular pixel buffer.
14
  */
15
class LDSDLRasterizer final : public LDRasterizer
16
{
17
public:
18
	explicit LDSDLRasterizer(std::unique_ptr<PostProcessor> postProcessor);
19
	~LDSDLRasterizer() override;
20
21
	// Rasterizer interface:
22
	[[nodiscard]] PostProcessor* getPostProcessor() const override;
23
	void frameStart(EmuTime time) override;
24
	void drawBlank(int r, int g, int b) override;
25
	[[nodiscard]] RawFrame* getRawFrame() override;
26
27
private:
28
	/** The video post processor which displays the frames produced by this
29
	  *  rasterizer.
30
	  */
31
	const std::unique_ptr<PostProcessor> postProcessor;
32
33
	/** The next frame as it is delivered by the VDP, work in progress.
34
	  */
35
	std::unique_ptr<RawFrame> workFrame;
36
};
37
38
} // namespace openmsx
39
40
#endif