openMSX
|
Rasterizer using a frame buffer approach: it writes pixels to a single rectangular pixel buffer. More...
#include <SDLRasterizer.hh>
Public Member Functions | |
SDLRasterizer (const SDLRasterizer &)=delete | |
SDLRasterizer & | operator= (const SDLRasterizer &)=delete |
SDLRasterizer (VDP &vdp, Display &display, OutputSurface &screen, std::unique_ptr< PostProcessor > postProcessor) | |
~SDLRasterizer () override | |
PostProcessor * | getPostProcessor () const override |
See VDP::getPostProcessor(). More... | |
bool | isActive () override |
Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not be displayed. More... | |
void | reset () override |
Resynchronize with VDP: all cached states are flushed. More... | |
void | frameStart (EmuTime::param time) override |
Indicates the start of a new frame. More... | |
void | frameEnd () override |
Indicates the end of the current frame. More... | |
void | setDisplayMode (DisplayMode mode) override |
Precalc several values that depend on the display mode. More... | |
void | setPalette (int index, int grb) override |
Change an entry in the palette. More... | |
void | setBackgroundColor (int index) override |
Changes the background color. More... | |
void | setHorizontalAdjust (int adjust) override |
void | setHorizontalScrollLow (byte scroll) override |
void | setBorderMask (bool masked) override |
void | setTransparency (bool enabled) override |
void | setSuperimposeVideoFrame (const RawFrame *videoSource) override |
void | drawBorder (int fromX, int fromY, int limitX, int limitY) override |
Render a rectangle of border pixels on the host screen. More... | |
void | drawDisplay (int fromX, int fromY, int displayX, int displayY, int displayWidth, int displayHeight) override |
Render a rectangle of display pixels on the host screen. More... | |
void | drawSprites (int fromX, int fromY, int displayX, int displayY, int displayWidth, int displayHeight) override |
Render a rectangle of sprite pixels on the host screen. More... | |
bool | isRecording () const override |
Is video recording active? More... | |
![]() | |
virtual | ~Rasterizer ()=default |
Additional Inherited Members | |
![]() | |
Rasterizer ()=default | |
Rasterizer using a frame buffer approach: it writes pixels to a single rectangular pixel buffer.
Definition at line 28 of file SDLRasterizer.hh.
|
delete |
openmsx::SDLRasterizer< Pixel >::SDLRasterizer | ( | VDP & | vdp, |
Display & | display, | ||
OutputSurface & | screen, | ||
std::unique_ptr< PostProcessor > | postProcessor | ||
) |
Definition at line 72 of file SDLRasterizer.cc.
References openmsx::Subject< T >::attach(), openmsx::RenderSettings::getBrightnessSetting(), openmsx::RenderSettings::getColorMatrixSetting(), openmsx::RenderSettings::getContrastSetting(), openmsx::RenderSettings::getGammaSetting(), openmsx::VDP::isMSX1VDP(), and xrange().
|
override |
Definition at line 102 of file SDLRasterizer.cc.
|
overridevirtual |
Render a rectangle of border pixels on the host screen.
The units are absolute lines (Y) and VDP clockticks (X).
fromX | X coordinate of render start (inclusive). |
fromY | Y coordinate of render start (inclusive). |
limitX | X coordinate of render end (exclusive). |
limitY | Y coordinate of render end (exclusive). |
Implements openmsx::Rasterizer.
Definition at line 395 of file SDLRasterizer.cc.
References gl::max(), gl::min(), openmsx::VDP::TICKS_PER_LINE, openmsx::x, and xrange().
|
overridevirtual |
Render a rectangle of display pixels on the host screen.
fromX | X coordinate of render start in VDP ticks. |
fromY | Y coordinate of render start in absolute lines. |
displayX | display coordinate of render start: [0..512). |
displayY | display coordinate of render start: [0..256). |
displayWidth | rectangle width in pixels (512 per line). |
displayHeight | rectangle height in lines. |
Implements openmsx::Rasterizer.
Definition at line 433 of file SDLRasterizer.cc.
References openmsx::DisplayMode::getLineWidth(), openmsx::DisplayMode::isBitmapMode(), openmsx::DisplayMode::isPlanar(), openmsx::DisplayMode::isTextMode(), gl::min(), openmsx::x, and xrange().
|
overridevirtual |
Render a rectangle of sprite pixels on the host screen.
Although the parameters are very similar to drawDisplay, the displayX and displayWidth use range [0..256) instead of [0..512) because VDP sprite coordinates work that way.
fromX | X coordinate of render start in VDP ticks. |
fromY | Y coordinate of render start in absolute lines. |
displayX | display coordinate of render start: [0..256). |
displayY | display coordinate of render start: [0..256). |
displayWidth | rectangle width in pixels (256 per line). |
displayHeight | rectangle height in lines. |
Implements openmsx::Rasterizer.
Definition at line 566 of file SDLRasterizer.cc.
References openmsx::DisplayMode::GRAPHIC5, openmsx::DisplayMode::GRAPHIC6, and gl::min().
|
overridevirtual |
Indicates the end of the current frame.
The rasterizer can perform image post processing.
Implements openmsx::Rasterizer.
Definition at line 171 of file SDLRasterizer.cc.
|
overridevirtual |
Indicates the start of a new frame.
The rasterizer can fetch per-frame settings from the VDP.
Implements openmsx::Rasterizer.
Definition at line 154 of file SDLRasterizer.cc.
References openmsx::FrameSource::FIELD_EVEN, openmsx::FrameSource::FIELD_NONINTERLACED, and openmsx::FrameSource::FIELD_ODD.
|
overridevirtual |
Implements openmsx::Rasterizer.
Definition at line 111 of file SDLRasterizer.cc.
|
overridevirtual |
Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not be displayed.
TODO: Is querying the next pipeline step the best way to solve this, or is it better to explicitly disable the first step in the pipeline?
Implements openmsx::Rasterizer.
Definition at line 117 of file SDLRasterizer.cc.
|
overridevirtual |
Is video recording active?
Implements openmsx::Rasterizer.
Definition at line 623 of file SDLRasterizer.cc.
|
delete |
|
overridevirtual |
Resynchronize with VDP: all cached states are flushed.
Implements openmsx::Rasterizer.
Definition at line 125 of file SDLRasterizer.cc.
|
overridevirtual |
Changes the background color.
index | Palette index of the new background color. |
Implements openmsx::Rasterizer.
Definition at line 206 of file SDLRasterizer.cc.
References openmsx::DisplayMode::GRAPHIC7.
|
overridevirtual |
Implements openmsx::Rasterizer.
Definition at line 225 of file SDLRasterizer.cc.
|
overridevirtual |
Precalc several values that depend on the display mode.
mode | The new display mode. |
Implements openmsx::Rasterizer.
Definition at line 176 of file SDLRasterizer.cc.
References openmsx::DisplayMode::getByte(), openmsx::DisplayMode::GRAPHIC7, and openmsx::DisplayMode::isBitmapMode().
|
overridevirtual |
Implements openmsx::Rasterizer.
Definition at line 215 of file SDLRasterizer.cc.
|
overridevirtual |
Implements openmsx::Rasterizer.
Definition at line 220 of file SDLRasterizer.cc.
|
overridevirtual |
Change an entry in the palette.
index | The index [0..15] in the palette that changes. |
grb | The new definition for the changed palette index: bit 10..8 is green, bit 6..4 is red and bit 2..0 is blue; all other bits are zero. |
Implements openmsx::Rasterizer.
Definition at line 192 of file SDLRasterizer.cc.
|
overridevirtual |
Implements openmsx::Rasterizer.
Definition at line 146 of file SDLRasterizer.cc.
|
overridevirtual |
Implements openmsx::Rasterizer.
Definition at line 230 of file SDLRasterizer.cc.