ScummVM API documentation
Stark::Gfx::Driver Class Referenceabstract
Inheritance diagram for Stark::Gfx::Driver:
Stark::Gfx::TinyGLDriver

Public Member Functions

virtual void init ()=0
 
bool computeScreenViewport ()
 
virtual void setScreenViewport (bool noScaling)=0
 
virtual void setViewport (const Common::Rect &rect)=0
 
Common::Rect getScreenViewport ()
 
Common::Rect gameViewport () const
 
virtual void clearScreen ()=0
 
virtual void flipBuffer ()=0
 
virtual TexturecreateTexture ()=0
 
virtual BitmapcreateBitmap (const Graphics::Surface *surface=nullptr, const byte *palette=nullptr)=0
 
virtual VisualActorcreateActorRenderer ()=0
 
virtual VisualPropcreatePropRenderer ()=0
 
virtual SurfaceRenderercreateSurfaceRenderer ()=0
 
virtual FadeRenderercreateFadeRenderer ()=0
 
bool isPosInScreenBounds (const Common::Point &point) const
 
Common::Point convertCoordinateCurrentToOriginal (const Common::Point &point) const
 
uint scaleWidthOriginalToCurrent (uint width) const
 
uint scaleHeightOriginalToCurrent (uint height) const
 
uint scaleWidthCurrentToOriginal (uint width) const
 
uint scaleHeightCurrentToOriginal (uint width) const
 
virtual Graphics::SurfacegetViewportScreenshot () const =0
 
virtual void set3DMode ()=0
 
virtual bool computeLightsEnabled ()=0
 
virtual bool supportsModdedAssets () const
 

Static Public Member Functions

static Drivercreate ()
 
static const Graphics::PixelFormat getRGBAPixelFormat ()
 

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
 
bool _computeLights
 

Member Function Documentation

◆ getScreenViewport()

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

Get the screen viewport in actual resolution

◆ createTexture()

virtual Texture* Stark::Gfx::Driver::createTexture ( )
pure virtual

Create a new texture for 3D

The caller is responsible for freeing it.

Implemented in Stark::Gfx::TinyGLDriver.

◆ createBitmap()

virtual Bitmap* Stark::Gfx::Driver::createBitmap ( const Graphics::Surface surface = nullptr,
const byte *  palette = nullptr 
)
pure virtual

Create a new bitmap for 2D

The caller is responsible for freeing it.

Implemented in Stark::Gfx::TinyGLDriver.

◆ createActorRenderer()

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

Create a new actor renderer

The caller is responsible for freeing it.

Implemented in Stark::Gfx::TinyGLDriver.

◆ createPropRenderer()

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

Create a new prop renderer

The caller is responsible for freeing it.

Implemented in Stark::Gfx::TinyGLDriver.

◆ createSurfaceRenderer()

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

Create a new surface renderer

The caller is responsible for freeing it.

Implemented in Stark::Gfx::TinyGLDriver.

◆ createFadeRenderer()

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

Create a new fade renderer

The caller is responsible for freeing it.

Implemented in Stark::Gfx::TinyGLDriver.

◆ isPosInScreenBounds()

bool Stark::Gfx::Driver::isPosInScreenBounds ( const Common::Point point) const

Checks if a screenpoint coord is within window bounds

◆ convertCoordinateCurrentToOriginal()

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

Convert a coordinate from current to original resolution

◆ scaleWidthOriginalToCurrent()

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

Scale a width value from original resolution to current resolution

◆ scaleHeightOriginalToCurrent()

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

Scale a height value from original resolution to current resolution

◆ scaleWidthCurrentToOriginal()

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

Scale a width value from current resolution to original resolution

◆ scaleHeightCurrentToOriginal()

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

Scale a height value from current resolution to original resolution

◆ getRGBAPixelFormat()

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

◆ getViewportScreenshot()

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

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

Implemented in Stark::Gfx::TinyGLDriver.


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