ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <driver.h>

Collaboration diagram for Stark::Gfx::Driver:

List of all members.

Public Member Functions

virtual ~Driver ()
virtual void init ()=0
void toggleFullscreen () const
 Toggle between windowed mode and fullscreen when spported by the backend.
bool computeScreenViewport ()
virtual void setScreenViewport (bool noScaling)=0
virtual void setViewport (const Common::Rect &rect)=0
Common::Rect getScreenViewport ()
 Get the screen viewport in actual resolution.
Common::Rect gameViewport () const
virtual void clearScreen ()=0
virtual void flipBuffer ()=0
virtual TexturecreateTexture (const Graphics::Surface *surface=nullptr, const byte *palette=nullptr)=0
 Create a new texture.
virtual VisualActorcreateActorRenderer ()=0
 Create a new actor renderer.
virtual VisualPropcreatePropRenderer ()=0
 Create a new prop renderer.
virtual SurfaceRenderercreateSurfaceRenderer ()=0
 Create a new surface renderer.
virtual FadeRenderercreateFadeRenderer ()=0
 Create a new fade renderer.
bool isPosInScreenBounds (const Common::Point &point) const
 Checks if a screenpoint coord is within window bounds.
Common::Point convertCoordinateCurrentToOriginal (const Common::Point &point) const
 Convert a coordinate from current to original resolution.
uint scaleWidthOriginalToCurrent (uint width) const
 Scale a width value from original resolution to current resolution.
uint scaleHeightOriginalToCurrent (uint height) const
 Scale a height value from original resolution to current resolution.
uint scaleWidthCurrentToOriginal (uint width) const
 Scale a width value from current resolution to original resolution.
uint scaleHeightCurrentToOriginal (uint width) const
 Scale a height value from current resolution to original resolution.
virtual Graphics::SurfacegetViewportScreenshot () const =0
 Grab a screenshot of the currently active viewport as defined by setViewport.
virtual void set3DMode ()=0

Static Public Member Functions

static Drivercreate ()
static const Graphics::PixelFormat getRGBAPixelFormat ()
 Textures are expected to be in the RGBA byte order.

Static Public Attributes

static const int32 kOriginalWidth = 640
static const int32 kOriginalHeight = 480
static const int32 kTopBorderHeight = 36
static const int32 kGameViewportHeight = 365
static const int32 kBottomBorderHeight = 79
static const int32 kGameViewportWidth = 640

Static Protected Member Functions

static void flipVertical (Graphics::Surface *s)

Protected Attributes

Common::Rect _screenViewport

Detailed Description

Definition at line 44 of file driver.h.


Constructor & Destructor Documentation

virtual Stark::Gfx::Driver::~Driver (  )  [inline, virtual]

Definition at line 48 of file driver.h.


Member Function Documentation

virtual void Stark::Gfx::Driver::clearScreen (  )  [pure virtual]
bool Stark::Gfx::Driver::computeScreenViewport (  ) 

Definition at line 69 of file driver.cpp.

Common::Point Stark::Gfx::Driver::convertCoordinateCurrentToOriginal ( const Common::Point point  )  const

Convert a coordinate from current to original resolution.

Definition at line 103 of file driver.cpp.

Driver * Stark::Gfx::Driver::create (  )  [static]

Definition at line 36 of file driver.cpp.

virtual VisualActor* Stark::Gfx::Driver::createActorRenderer (  )  [pure virtual]

Create a new actor renderer.

The caller is responsible for freeing it.

virtual FadeRenderer* Stark::Gfx::Driver::createFadeRenderer (  )  [pure virtual]

Create a new fade renderer.

The caller is responsible for freeing it.

virtual VisualProp* Stark::Gfx::Driver::createPropRenderer (  )  [pure virtual]

Create a new prop renderer.

The caller is responsible for freeing it.

virtual SurfaceRenderer* Stark::Gfx::Driver::createSurfaceRenderer (  )  [pure virtual]

Create a new surface renderer.

The caller is responsible for freeing it.

virtual Texture* Stark::Gfx::Driver::createTexture ( const Graphics::Surface surface = nullptr,
const byte palette = nullptr 
) [pure virtual]

Create a new texture.

The caller is responsible for freeing it.

virtual void Stark::Gfx::Driver::flipBuffer (  )  [pure virtual]
void Stark::Gfx::Driver::flipVertical ( Graphics::Surface s  )  [static, protected]

Definition at line 132 of file driver.cpp.

Common::Rect Stark::Gfx::Driver::gameViewport (  )  const

Definition at line 96 of file driver.cpp.

const Graphics::PixelFormat Stark::Gfx::Driver::getRGBAPixelFormat (  )  [static]

Textures are expected to be in the RGBA byte order.

That is to say bitmaps sent to OpenGL need to have the following layout: R G B A R G B A, ...

This method can be used to retrieve what that means in terms of pixel format according to the current platform's endianness.

Definition at line 51 of file driver.cpp.

Common::Rect Stark::Gfx::Driver::getScreenViewport (  )  [inline]

Get the screen viewport in actual resolution.

Definition at line 63 of file driver.h.

virtual Graphics::Surface* Stark::Gfx::Driver::getViewportScreenshot (  )  const [pure virtual]

Grab a screenshot of the currently active viewport as defined by setViewport.

virtual void Stark::Gfx::Driver::init (  )  [pure virtual]
bool Stark::Gfx::Driver::isPosInScreenBounds ( const Common::Point point  )  const

Checks if a screenpoint coord is within window bounds.

Definition at line 143 of file driver.cpp.

uint Stark::Gfx::Driver::scaleHeightCurrentToOriginal ( uint  width  )  const

Scale a height value from current resolution to original resolution.

Definition at line 128 of file driver.cpp.

uint Stark::Gfx::Driver::scaleHeightOriginalToCurrent ( uint  height  )  const

Scale a height value from original resolution to current resolution.

Definition at line 120 of file driver.cpp.

uint Stark::Gfx::Driver::scaleWidthCurrentToOriginal ( uint  width  )  const

Scale a width value from current resolution to original resolution.

Definition at line 124 of file driver.cpp.

uint Stark::Gfx::Driver::scaleWidthOriginalToCurrent ( uint  width  )  const

Scale a width value from original resolution to current resolution.

Definition at line 116 of file driver.cpp.

virtual void Stark::Gfx::Driver::set3DMode (  )  [pure virtual]
virtual void Stark::Gfx::Driver::setScreenViewport ( bool  noScaling  )  [pure virtual]
virtual void Stark::Gfx::Driver::setViewport ( const Common::Rect rect  )  [pure virtual]
void Stark::Gfx::Driver::toggleFullscreen (  )  const

Toggle between windowed mode and fullscreen when spported by the backend.

Definition at line 59 of file driver.cpp.


Member Data Documentation

Definition at line 152 of file driver.h.

Definition at line 145 of file driver.h.

Definition at line 144 of file driver.h.

Definition at line 147 of file driver.h.

Definition at line 141 of file driver.h.

Definition at line 140 of file driver.h.

Definition at line 143 of file driver.h.


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


Generated on Sat Nov 9 2019 05:02:28 for ResidualVM by doxygen 1.7.1
curved edge   curved edge