openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::Rasterizer Class Referenceabstract

#include <Rasterizer.hh>

Inheritance diagram for openmsx::Rasterizer:
Inheritance graph
[legend]

Public Member Functions

virtual ~Rasterizer ()=default
 
virtual PostProcessorgetPostProcessor () const =0
 See VDP::getPostProcessor(). More...
 
virtual bool isActive ()=0
 Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not be displayed. More...
 
virtual void reset ()=0
 Resynchronize with VDP: all cached states are flushed. More...
 
virtual void frameStart (EmuTime::param time)=0
 Indicates the start of a new frame. More...
 
virtual void frameEnd ()=0
 Indicates the end of the current frame. More...
 
virtual void setDisplayMode (DisplayMode mode)=0
 Precalc several values that depend on the display mode. More...
 
virtual void setPalette (int index, int grb)=0
 Change an entry in the palette. More...
 
virtual void setBackgroundColor (int index)=0
 Changes the background color. More...
 
virtual void setHorizontalAdjust (int adjust)=0
 
virtual void setHorizontalScrollLow (byte scroll)=0
 
virtual void setBorderMask (bool masked)=0
 
virtual void setTransparency (bool enabled)=0
 
virtual void setSuperimposeVideoFrame (const RawFrame *videoSource)=0
 
virtual void drawBorder (int fromX, int fromY, int limitX, int limitY)=0
 Render a rectangle of border pixels on the host screen. More...
 
virtual void drawDisplay (int fromX, int fromY, int displayX, int displayY, int displayWidth, int displayHeight)=0
 Render a rectangle of display pixels on the host screen. More...
 
virtual void drawSprites (int fromX, int fromY, int displayX, int displayY, int displayWidth, int displayHeight)=0
 Render a rectangle of sprite pixels on the host screen. More...
 
virtual bool isRecording () const =0
 Is video recording active? More...
 

Protected Member Functions

 Rasterizer ()=default
 

Detailed Description

Definition at line 12 of file Rasterizer.hh.

Constructor & Destructor Documentation

◆ ~Rasterizer()

virtual openmsx::Rasterizer::~Rasterizer ( )
virtualdefault

◆ Rasterizer()

openmsx::Rasterizer::Rasterizer ( )
protecteddefault

Member Function Documentation

◆ drawBorder()

virtual void openmsx::Rasterizer::drawBorder ( int  fromX,
int  fromY,
int  limitX,
int  limitY 
)
pure virtual

Render a rectangle of border pixels on the host screen.

The units are absolute lines (Y) and VDP clockticks (X).

Parameters
fromXX coordinate of render start (inclusive).
fromYY coordinate of render start (inclusive).
limitXX coordinate of render end (exclusive).
limitYY coordinate of render end (exclusive).

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ drawDisplay()

virtual void openmsx::Rasterizer::drawDisplay ( int  fromX,
int  fromY,
int  displayX,
int  displayY,
int  displayWidth,
int  displayHeight 
)
pure virtual

Render a rectangle of display pixels on the host screen.

Parameters
fromXX coordinate of render start in VDP ticks.
fromYY coordinate of render start in absolute lines.
displayXdisplay coordinate of render start: [0..512).
displayYdisplay coordinate of render start: [0..256).
displayWidthrectangle width in pixels (512 per line).
displayHeightrectangle height in lines.

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ drawSprites()

virtual void openmsx::Rasterizer::drawSprites ( int  fromX,
int  fromY,
int  displayX,
int  displayY,
int  displayWidth,
int  displayHeight 
)
pure virtual

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.

Parameters
fromXX coordinate of render start in VDP ticks.
fromYY coordinate of render start in absolute lines.
displayXdisplay coordinate of render start: [0..256).
displayYdisplay coordinate of render start: [0..256).
displayWidthrectangle width in pixels (256 per line).
displayHeightrectangle height in lines.

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ frameEnd()

virtual void openmsx::Rasterizer::frameEnd ( )
pure virtual

Indicates the end of the current frame.

The rasterizer can perform image post processing.

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ frameStart()

virtual void openmsx::Rasterizer::frameStart ( EmuTime::param  time)
pure virtual

Indicates the start of a new frame.

The rasterizer can fetch per-frame settings from the VDP.

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ getPostProcessor()

virtual PostProcessor* openmsx::Rasterizer::getPostProcessor ( ) const
pure virtual

◆ isActive()

virtual bool openmsx::Rasterizer::isActive ( )
pure virtual

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?

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ isRecording()

virtual bool openmsx::Rasterizer::isRecording ( ) const
pure virtual

Is video recording active?

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ reset()

virtual void openmsx::Rasterizer::reset ( )
pure virtual

Resynchronize with VDP: all cached states are flushed.

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ setBackgroundColor()

virtual void openmsx::Rasterizer::setBackgroundColor ( int  index)
pure virtual

Changes the background color.

Parameters
indexPalette index of the new background color.

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ setBorderMask()

virtual void openmsx::Rasterizer::setBorderMask ( bool  masked)
pure virtual

◆ setDisplayMode()

virtual void openmsx::Rasterizer::setDisplayMode ( DisplayMode  mode)
pure virtual

Precalc several values that depend on the display mode.

Parameters
modeThe new display mode.

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ setHorizontalAdjust()

virtual void openmsx::Rasterizer::setHorizontalAdjust ( int  adjust)
pure virtual

◆ setHorizontalScrollLow()

virtual void openmsx::Rasterizer::setHorizontalScrollLow ( byte  scroll)
pure virtual

◆ setPalette()

virtual void openmsx::Rasterizer::setPalette ( int  index,
int  grb 
)
pure virtual

Change an entry in the palette.

Parameters
indexThe index [0..15] in the palette that changes.
grbThe 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.

Implemented in openmsx::SDLRasterizer< Pixel >.

◆ setSuperimposeVideoFrame()

virtual void openmsx::Rasterizer::setSuperimposeVideoFrame ( const RawFrame videoSource)
pure virtual

◆ setTransparency()

virtual void openmsx::Rasterizer::setTransparency ( bool  enabled)
pure virtual

The documentation for this class was generated from the following file: