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().
 
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.
 
virtual void reset ()=0
 Resynchronize with VDP: all cached states are flushed.
 
virtual void frameStart (EmuTime::param time)=0
 Indicates the start of a new frame.
 
virtual void frameEnd ()=0
 Indicates the end of the current frame.
 
virtual void setDisplayMode (DisplayMode mode)=0
 Precalc several values that depend on the display mode.
 
virtual void setPalette (unsigned index, int grb)=0
 Change an entry in the palette.
 
virtual void setBackgroundColor (byte index)=0
 Changes the background color.
 
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.
 
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.
 
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.
 
virtual bool isRecording () const =0
 Is video recording active?
 

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 clock ticks (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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ isRecording()

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

Is video recording active?

Implemented in openmsx::SDLRasterizer.

◆ reset()

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

Resynchronize with VDP: all cached states are flushed.

Implemented in openmsx::SDLRasterizer.

◆ setBackgroundColor()

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

Changes the background color.

Parameters
indexPalette index of the new background color.

Implemented in openmsx::SDLRasterizer.

◆ setBorderMask()

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

Implemented in openmsx::SDLRasterizer.

◆ 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.

◆ setHorizontalAdjust()

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

Implemented in openmsx::SDLRasterizer.

◆ setHorizontalScrollLow()

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

Implemented in openmsx::SDLRasterizer.

◆ setPalette()

virtual void openmsx::Rasterizer::setPalette ( unsigned  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.

◆ setSuperimposeVideoFrame()

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

Implemented in openmsx::SDLRasterizer.

◆ setTransparency()

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

Implemented in openmsx::SDLRasterizer.


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