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 shouldRenderToFramebuffer () const
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 47 of file openglsdl-graphics.cpp.

OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager (  )  [virtual]

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

Member Function Documentation

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

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

void OpenGLSdlGraphicsManager::closeOverlay (  )  [protected]

Definition at line 626 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 245 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 605 of file openglsdl-graphics.cpp.

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

Definition at line 497 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 328 of file openglsdl-graphics.cpp.

void OpenGLSdlGraphicsManager::createOrUpdateScreen (  )  [protected]

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

void OpenGLSdlGraphicsManager::drawOverlay (  )  [protected]

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

void OpenGLSdlGraphicsManager::drawSideTextures (  )  [protected]

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

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

Reimplemented from ResVmSdlGraphicsManager.

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

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

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

int16 OpenGLSdlGraphicsManager::getOverlayHeight (  )  const [override]

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

int16 OpenGLSdlGraphicsManager::getOverlayWidth (  )  const [override]

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

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

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

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

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

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

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

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

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

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

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

void OpenGLSdlGraphicsManager::initializeOpenGLContext (  )  const [protected]

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

bool OpenGLSdlGraphicsManager::isVSyncEnabled (  )  const [protected]

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

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

Definition at line 266 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 690 of file openglsdl-graphics.cpp.

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

Reimplemented from ResVmSdlGraphicsManager.

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

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

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

bool OpenGLSdlGraphicsManager::shouldRenderToFramebuffer (  )  const [protected]

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

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

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

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

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

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

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

void OpenGLSdlGraphicsManager::updateScreen (  )  [virtual]

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

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

Definition at line 653 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 Jul 20 2019 05:02:15 for ResidualVM by doxygen 1.7.1
curved edge   curved edge