ScummVM API documentation
Myst3::Renderer Class Referenceabstract
Inheritance diagram for Myst3::Renderer:
Myst3::OpenGLRenderer Myst3::ShaderRenderer Myst3::TinyGLRenderer

Public Member Functions

 Renderer (OSystem *system)
 
virtual void init ()=0
 
virtual void clear ()=0
 
virtual void flipBuffer ()
 
virtual void initFont (const Graphics::Surface *surface)
 
virtual void freeFont ()
 
virtual TexturecreateTexture3D (const Graphics::Surface *surface)=0
 
virtual TexturecreateTexture2D (const Graphics::Surface *surface)
 
virtual void drawRect2D (const Common::Rect &rect, uint8 a, uint8 r, uint8 g, uint8 b)=0
 
virtual void drawTexturedRect2D (const Common::Rect &screenRect, const Common::Rect &textureRect, Texture *texture, float transparency=-1.0, bool additiveBlending=false)=0
 
virtual void drawTexturedRect3D (const Math::Vector3d &topLeft, const Math::Vector3d &bottomLeft, const Math::Vector3d &topRight, const Math::Vector3d &bottomRight, Texture *texture)=0
 
virtual void drawCube (Texture **textures)=0
 
virtual void draw2DText (const Common::String &text, const Common::Point &position)=0
 
virtual Graphics::SurfacegetScreenshot ()=0
 
virtual TexturecopyScreenshotToTexture ()
 
void renderDrawable (Drawable *drawable, Window *window)
 
void renderDrawableOverlay (Drawable *drawable, Window *window)
 
void renderWindow (Window *window)
 
void renderWindowOverlay (Window *window)
 
Common::Rect viewport () const
 
virtual void selectTargetWindow (Window *window, bool is3D, bool scaled)=0
 
void setupCameraPerspective (float pitch, float heading, float fov)
 
bool isCubeFaceVisible (uint face)
 
Math::Matrix4 getMvpMatrix () const
 
void flipVertical (Graphics::Surface *s)
 
void computeScreenViewport ()
 

Static Public Attributes

static const int kOriginalWidth = 640
 
static const int kOriginalHeight = 480
 
static const int kTopBorderHeight = 30
 
static const int kBottomBorderHeight = 90
 
static const int kFrameHeight = 360
 

Protected Member Functions

Common::Rect getFontCharacterRect (uint8 character)
 
Math::Matrix4 makeProjectionMatrix (float fov) const
 

Protected Attributes

OSystem_system
 
Texture_font
 
Common::Rect _screenViewport
 
Math::Matrix4 _projectionMatrix
 
Math::Matrix4 _modelViewMatrix
 
Math::Matrix4 _mvpMatrix
 
Math::Frustum _frustum
 
Math::AABB _cubeFacesAABB [6]
 

Static Protected Attributes

static const float cubeVertices [5 *6 *4]
 

Member Function Documentation

◆ flipBuffer()

virtual void Myst3::Renderer::flipBuffer ( )
inlinevirtual

Swap the buffers, making the drawn screen visible

Reimplemented in Myst3::TinyGLRenderer.

◆ renderDrawable()

void Myst3::Renderer::renderDrawable ( Drawable drawable,
Window window 
)

Render a Drawable in the specified window

◆ renderDrawableOverlay()

void Myst3::Renderer::renderDrawableOverlay ( Drawable drawable,
Window window 
)

Render a Drawable overlay in the specified window

◆ renderWindow()

void Myst3::Renderer::renderWindow ( Window window)

Render the main Drawable of a Window

◆ renderWindowOverlay()

void Myst3::Renderer::renderWindowOverlay ( Window window)

Render the main Drawable overlay of a Window

◆ selectTargetWindow()

virtual void Myst3::Renderer::selectTargetWindow ( Window window,
bool  is3D,
bool  scaled 
)
pure virtual

Select the window where to render

This also sets the viewport

Implemented in Myst3::TinyGLRenderer, Myst3::ShaderRenderer, and Myst3::OpenGLRenderer.


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