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

OpenGLSdlGraphicsManager Class Reference

SDL OpenGL based graphics manager. More...

#include <openglsdl-graphics.h>

Inheritance diagram for OpenGLSdlGraphicsManager:
Collaboration diagram for OpenGLSdlGraphicsManager:

List of all members.


struct  OpenGLPixelFormat

Public Member Functions

 OpenGLSdlGraphicsManager (SdlEventSource *sdlEventSource, SdlWindow *window, const Capabilities &capabilities)
virtual ~OpenGLSdlGraphicsManager ()
virtual bool hasFeature (OSystem::Feature f) const override
virtual bool getFeatureState (OSystem::Feature f) const override
virtual void setFeatureState (OSystem::Feature f, bool enable) override
virtual void setupScreen (uint gameWidth, uint gameHeight, bool fullscreen, bool accel3d) override
virtual Graphics::PixelBuffer getScreenPixelBuffer () override
virtual int16 getHeight () const override
virtual int16 getWidth () const override
virtual void updateScreen ()
virtual void showOverlay () override
virtual void hideOverlay () override
virtual void clearOverlay () override
virtual void grabOverlay (void *buf, int pitch) const override
virtual void copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h) override
int16 getOverlayWidth () const override
int16 getOverlayHeight () const override
virtual void suggestSideTextures (Graphics::Surface *left, Graphics::Surface *right) override
virtual void warpMouse (int x, int y) override
virtual void transformMouseCoordinates (Common::Point &point) override
void notifyResize (const uint width, const uint height) override

Protected Member Functions

bool createOrUpdateGLContext (uint gameWidth, uint gameHeight, uint effectiveWidth, uint effectiveHeight, bool renderToFramebuffer)
 Initialize an OpenGL window matching as closely as possible the required properties.
void createOrUpdateScreen ()
Math::Rect2d computeGameRect (bool renderToFrameBuffer, uint gameWidth, uint gameHeight, uint screenWidth, uint screenHeight)
 Compute the size and position of the game rectangle in the screen.
bool saveScreenshot (const Common::String &file) const override
 Save a screenshot to the specified file.
void initializeOpenGLContext () const
void drawOverlay ()
void drawSideTextures ()
void closeOverlay ()
OpenGL::FrameBuffercreateFramebuffer (uint width, uint height)
bool isVSyncEnabled () const

Protected Attributes

Math::Rect2d _gameRect
int _antialiasing
bool _vsync
OpenGL::Texture_sideTextures [2]

Detailed Description

SDL OpenGL based graphics manager.

Used when rendering games with OpenGL

Definition at line 40 of file openglsdl-graphics.h.

Constructor & Destructor Documentation

OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager ( SdlEventSource sdlEventSource,
SdlWindow window,
const Capabilities capabilities 

Definition at line 42 of file openglsdl-graphics.cpp.

OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager (  )  [virtual]

Definition at line 61 of file openglsdl-graphics.cpp.

Member Function Documentation

void OpenGLSdlGraphicsManager::clearOverlay (  )  [override, virtual]

Definition at line 576 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::closeOverlay (  )  [protected]

Definition at line 593 of file openglsdl-graphics.cpp.

Math::Rect2d OpenGLSdlGraphicsManager::computeGameRect ( bool  renderToFrameBuffer,
uint  gameWidth,
uint  gameHeight,
uint  screenWidth,
uint  screenHeight 
) [protected]

Compute the size and position of the game rectangle in the screen.

Definition at line 220 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::copyRectToOverlay ( const void *  buf,
int  pitch,
int  x,
int  y,
int  w,
int  h 
) [override, virtual]

Definition at line 572 of file openglsdl-graphics.cpp.

OpenGL::FrameBuffer * OpenGLSdlGraphicsManager::createFramebuffer ( uint  width,
uint  height 
) [protected]

Definition at line 464 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::createOrUpdateGLContext ( uint  gameWidth,
uint  gameHeight,
uint  effectiveWidth,
uint  effectiveHeight,
bool  renderToFramebuffer 
) [protected]

Initialize an OpenGL window matching as closely as possible the required properties.

When unable to create a context with anti-aliasing this tries without. When unable to create a context with the desired pixel depth this tries lower values.

Definition at line 303 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::createOrUpdateScreen (  )  [protected]

Definition at line 153 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::drawOverlay (  )  [protected]

Definition at line 425 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::drawSideTextures (  )  [protected]

Definition at line 442 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::getFeatureState ( OSystem::Feature  f  )  const [override, virtual]

Reimplemented from ResVmSdlGraphicsManager.

Definition at line 80 of file openglsdl-graphics.cpp.

int16 OpenGLSdlGraphicsManager::getHeight (  )  const [override, virtual]

Definition at line 508 of file openglsdl-graphics.cpp.

int16 OpenGLSdlGraphicsManager::getOverlayHeight (  )  const [override]

Definition at line 612 of file openglsdl-graphics.cpp.

int16 OpenGLSdlGraphicsManager::getOverlayWidth (  )  const [override]

Definition at line 616 of file openglsdl-graphics.cpp.

Graphics::PixelBuffer OpenGLSdlGraphicsManager::getScreenPixelBuffer (  )  [override, virtual]

Definition at line 271 of file openglsdl-graphics.cpp.

int16 OpenGLSdlGraphicsManager::getWidth (  )  const [override, virtual]

Definition at line 516 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::grabOverlay ( void *  buf,
int  pitch 
) const [override, virtual]

Definition at line 580 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::hasFeature ( OSystem::Feature  f  )  const [override, virtual]

Definition at line 68 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::hideOverlay (  )  [override, virtual]

Definition at line 562 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::initializeOpenGLContext (  )  const [protected]

Definition at line 275 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::isVSyncEnabled (  )  const [protected]

Definition at line 415 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::notifyResize ( const uint  width,
const uint  height 
) [override]

Definition at line 241 of file openglsdl-graphics.cpp.

bool OpenGLSdlGraphicsManager::saveScreenshot ( const Common::String file  )  const [override, protected, virtual]

Save a screenshot to the specified file.

Implements ResVmSdlGraphicsManager.

Definition at line 657 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::setFeatureState ( OSystem::Feature  f,
bool  enable 
) [override, virtual]

Reimplemented from ResVmSdlGraphicsManager.

Definition at line 89 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::setupScreen ( uint  gameWidth,
uint  gameHeight,
bool  fullscreen,
bool  accel3d 
) [override, virtual]

Definition at line 103 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::showOverlay (  )  [override, virtual]

Definition at line 541 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::suggestSideTextures ( Graphics::Surface left,
Graphics::Surface right 
) [override, virtual]

Definition at line 528 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::transformMouseCoordinates ( Common::Point point  )  [override, virtual]

Definition at line 634 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::updateScreen (  )  [virtual]

Definition at line 476 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::warpMouse ( int  x,
int  y 
) [override, virtual]

Definition at line 620 of file openglsdl-graphics.cpp.

Member Data Documentation

Definition at line 118 of file openglsdl-graphics.h.

Definition at line 119 of file openglsdl-graphics.h.

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

Generated on Sat May 18 2019 05:04:57 for ResidualVM by doxygen 1.7.1
curved edge   curved edge