openMSX
video
ld
LDSDLRasterizer.cc
Go to the documentation of this file.
1
#include "
LDSDLRasterizer.hh
"
2
#include "
RawFrame.hh
"
3
#include "
PostProcessor.hh
"
4
#include "
PixelOperations.hh
"
5
#include <cstdint>
6
7
namespace
openmsx
{
8
9
LDSDLRasterizer::LDSDLRasterizer
(
10
std::unique_ptr<PostProcessor> postProcessor_)
11
: postProcessor(
std
::move(postProcessor_))
12
, workFrame(
std
::make_unique<
RawFrame
>(640, 480))
13
{
14
}
15
16
LDSDLRasterizer::~LDSDLRasterizer
() =
default
;
17
18
PostProcessor
*
LDSDLRasterizer::getPostProcessor
()
const
19
{
20
return
postProcessor.get();
21
}
22
23
void
LDSDLRasterizer::frameStart
(EmuTime::param time)
24
{
25
workFrame = postProcessor->rotateFrames(std::move(workFrame), time);
26
}
27
28
void
LDSDLRasterizer::drawBlank
(
int
r,
int
g
,
int
b)
29
{
30
// We should really be presenting the "LASERVISION" text
31
// here, like the real laserdisc player does. Note that this
32
// changes when seeking or starting to play.
33
PixelOperations
pixelOps;
34
auto
background = pixelOps.
combine
(r,
g
, b);
35
for
(
auto
y :
xrange
(480)) {
36
workFrame->setBlank(y, background);
37
}
38
}
39
40
RawFrame
*
LDSDLRasterizer::getRawFrame
()
41
{
42
return
workFrame.get();
43
}
44
45
}
// namespace openmsx
LDSDLRasterizer.hh
PixelOperations.hh
PostProcessor.hh
RawFrame.hh
g
int g
Definition
ScopedAssign_test.cc:20
openmsx::LDSDLRasterizer::~LDSDLRasterizer
~LDSDLRasterizer() override
openmsx::LDSDLRasterizer::drawBlank
void drawBlank(int r, int g, int b) override
Definition
LDSDLRasterizer.cc:28
openmsx::LDSDLRasterizer::LDSDLRasterizer
LDSDLRasterizer(std::unique_ptr< PostProcessor > postProcessor)
Definition
LDSDLRasterizer.cc:9
openmsx::LDSDLRasterizer::getPostProcessor
PostProcessor * getPostProcessor() const override
Definition
LDSDLRasterizer.cc:18
openmsx::LDSDLRasterizer::getRawFrame
RawFrame * getRawFrame() override
Definition
LDSDLRasterizer.cc:40
openmsx::LDSDLRasterizer::frameStart
void frameStart(EmuTime::param time) override
Definition
LDSDLRasterizer.cc:23
openmsx::PixelOperations
Definition
PixelOperations.hh:13
openmsx::PixelOperations::combine
Pixel combine(unsigned r, unsigned g, unsigned b) const
Combine RGB components to a pixel.
Definition
PixelOperations.hh:105
openmsx::PostProcessor
A post processor builds the frame that is displayed from the MSX frame, while applying effects such a...
Definition
PostProcessor.hh:35
openmsx::RawFrame
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition
RawFrame.hh:16
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
std
STL namespace.
xrange
constexpr auto xrange(T e)
Definition
xrange.hh:132
Generated on Thu Dec 19 2024 23:13:46 for openMSX by
1.9.8