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

#include <gfx.h>

Inheritance diagram for Myst3::Renderer:
Collaboration diagram for Myst3::Renderer:

List of all members.

Public Member Functions

 Renderer (OSystem *system)
virtual ~Renderer ()
virtual void init ()=0
virtual void clear ()=0
void toggleFullscreen ()
virtual void flipBuffer ()
 Swap the buffers, making the drawn screen visible.
virtual void initFont (const Graphics::Surface *surface)
virtual void freeFont ()
virtual TexturecreateTexture (const Graphics::Surface *surface)=0
virtual void freeTexture (Texture *texture)=0
virtual void drawRect2D (const Common::Rect &rect, uint32 color)=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
void renderDrawable (Drawable *drawable, Window *window)
 Render a Drawable in the specified window.
void renderDrawableOverlay (Drawable *drawable, Window *window)
 Render a Drawable overlay in the specified window.
void renderWindow (Window *window)
 Render the main Drawable of a Window.
void renderWindowOverlay (Window *window)
 Render the main Drawable overlay of a Window.
Common::Rect viewport () const
virtual void selectTargetWindow (Window *window, bool is3D, bool scaled)=0
 Select the window where to render.
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]

Detailed Description

Definition at line 109 of file gfx.h.


Constructor & Destructor Documentation

Myst3::Renderer::Renderer ( OSystem system  ) 

Definition at line 72 of file gfx.cpp.

Myst3::Renderer::~Renderer (  )  [virtual]

Definition at line 84 of file gfx.cpp.


Member Function Documentation

virtual void Myst3::Renderer::clear (  )  [pure virtual]
void Myst3::Renderer::computeScreenViewport (  ) 

Definition at line 121 of file gfx.cpp.

virtual Texture* Myst3::Renderer::createTexture ( const Graphics::Surface surface  )  [pure virtual]
virtual void Myst3::Renderer::draw2DText ( const Common::String text,
const Common::Point position 
) [pure virtual]
virtual void Myst3::Renderer::drawCube ( Texture **  textures  )  [pure virtual]
virtual void Myst3::Renderer::drawRect2D ( const Common::Rect rect,
uint32  color 
) [pure virtual]
virtual void Myst3::Renderer::drawTexturedRect2D ( const Common::Rect screenRect,
const Common::Rect textureRect,
Texture texture,
float  transparency = -1.0,
bool  additiveBlending = false 
) [pure virtual]
virtual void Myst3::Renderer::drawTexturedRect3D ( const Math::Vector3d topLeft,
const Math::Vector3d bottomLeft,
const Math::Vector3d topRight,
const Math::Vector3d bottomRight,
Texture texture 
) [pure virtual]
virtual void Myst3::Renderer::flipBuffer (  )  [inline, virtual]

Swap the buffers, making the drawn screen visible.

Reimplemented in Myst3::TinyGLRenderer.

Definition at line 121 of file gfx.h.

void Myst3::Renderer::flipVertical ( Graphics::Surface s  ) 

Definition at line 173 of file gfx.cpp.

void Myst3::Renderer::freeFont (  )  [virtual]

Definition at line 91 of file gfx.cpp.

virtual void Myst3::Renderer::freeTexture ( Texture texture  )  [pure virtual]
Common::Rect Myst3::Renderer::getFontCharacterRect ( uint8  character  )  [protected]

Definition at line 98 of file gfx.cpp.

Math::Matrix4 Myst3::Renderer::getMvpMatrix (  )  const [inline]

Definition at line 166 of file gfx.h.

virtual Graphics::Surface* Myst3::Renderer::getScreenshot (  )  [pure virtual]
virtual void Myst3::Renderer::init (  )  [pure virtual]
void Myst3::Renderer::initFont ( const Graphics::Surface surface  )  [virtual]

Definition at line 87 of file gfx.cpp.

bool Myst3::Renderer::isCubeFaceVisible ( uint  face  ) 

Definition at line 167 of file gfx.cpp.

Math::Matrix4 Myst3::Renderer::makeProjectionMatrix ( float  fov  )  const [protected]

Definition at line 139 of file gfx.cpp.

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

Render a Drawable in the specified window.

Definition at line 241 of file gfx.cpp.

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

Render a Drawable overlay in the specified window.

Definition at line 250 of file gfx.cpp.

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

Render the main Drawable of a Window.

Definition at line 260 of file gfx.cpp.

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

Render the main Drawable overlay of a Window.

Definition at line 264 of file gfx.cpp.

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::OpenGLRenderer, Myst3::ShaderRenderer, and Myst3::TinyGLRenderer.

void Myst3::Renderer::setupCameraPerspective ( float  pitch,
float  heading,
float  fov 
)

Definition at line 151 of file gfx.cpp.

void Myst3::Renderer::toggleFullscreen (  ) 

Definition at line 231 of file gfx.cpp.

Common::Rect Myst3::Renderer::viewport (  )  const

Definition at line 117 of file gfx.cpp.


Member Data Documentation

Definition at line 191 of file gfx.h.

Definition at line 180 of file gfx.h.

Definition at line 188 of file gfx.h.

Definition at line 185 of file gfx.h.

Definition at line 186 of file gfx.h.

Definition at line 184 of file gfx.h.

Definition at line 182 of file gfx.h.

Definition at line 179 of file gfx.h.

const float Myst3::Renderer::cubeVertices [static, protected]
Initial value:
 {
    
    0.0f, 1.0f, -320.0f, -320.0f, -320.0f,
    1.0f, 1.0f,  320.0f, -320.0f, -320.0f,
    0.0f, 0.0f, -320.0f,  320.0f, -320.0f,
    1.0f, 0.0f,  320.0f,  320.0f, -320.0f,
    0.0f, 1.0f,  320.0f, -320.0f, -320.0f,
    1.0f, 1.0f, -320.0f, -320.0f, -320.0f,
    0.0f, 0.0f,  320.0f, -320.0f,  320.0f,
    1.0f, 0.0f, -320.0f, -320.0f,  320.0f,
    0.0f, 1.0f,  320.0f, -320.0f,  320.0f,
    1.0f, 1.0f, -320.0f, -320.0f,  320.0f,
    0.0f, 0.0f,  320.0f,  320.0f,  320.0f,
    1.0f, 0.0f, -320.0f,  320.0f,  320.0f,
    0.0f, 1.0f,  320.0f, -320.0f, -320.0f,
    1.0f, 1.0f,  320.0f, -320.0f,  320.0f,
    0.0f, 0.0f,  320.0f,  320.0f, -320.0f,
    1.0f, 0.0f,  320.0f,  320.0f,  320.0f,
    0.0f, 1.0f, -320.0f, -320.0f,  320.0f,
    1.0f, 1.0f, -320.0f, -320.0f, -320.0f,
    0.0f, 0.0f, -320.0f,  320.0f,  320.0f,
    1.0f, 0.0f, -320.0f,  320.0f, -320.0f,
    0.0f, 1.0f,  320.0f,  320.0f,  320.0f,
    1.0f, 1.0f, -320.0f,  320.0f,  320.0f,
    0.0f, 0.0f,  320.0f,  320.0f, -320.0f,
    1.0f, 0.0f, -320.0f,  320.0f, -320.0f
}

Definition at line 190 of file gfx.h.

const int Myst3::Renderer::kBottomBorderHeight = 90 [static]

Definition at line 173 of file gfx.h.

const int Myst3::Renderer::kFrameHeight = 360 [static]

Definition at line 174 of file gfx.h.

const int Myst3::Renderer::kOriginalHeight = 480 [static]

Definition at line 171 of file gfx.h.

const int Myst3::Renderer::kOriginalWidth = 640 [static]

Definition at line 170 of file gfx.h.

const int Myst3::Renderer::kTopBorderHeight = 30 [static]

Definition at line 172 of file gfx.h.


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


Generated on Sat Jul 13 2019 05:04:38 for ResidualVM by doxygen 1.7.1
curved edge   curved edge