You.i Engine
CYISurface Class Reference

Detailed Description

The display is in charge of managing the graphics context, and storing information about the device display.

#include <renderer/YiSurface.h>

Classes

struct  Config
 

Public Types

enum  WINDOW_OWNERSHIP {
  OWNS_WINDOW,
  GRABS_WINDOW
}
 

Public Member Functions

 CYISurface ()
 
virtual ~CYISurface ()
 
virtual void UpdateScreen ()
 
int32_t GetWidth () const
 
int32_t GetHeight () const
 
CYIGraphicsComponentsGetGraphicsComponents ()
 
void * GetDevice ()
 
void * GetContext ()
 
void SurfaceWasResized (int32_t nWidth, int32_t nHeight)
 

Static Public Member Functions

static std::unique_ptr< CYISurfaceNew (const Config *pSurfaceConfig, WINDOW_OWNERSHIP eWindowOwnership)
 

Protected Member Functions

 CYISurface (CYISurfacePriv *m_pPriv)
 

Member Enumeration Documentation

Enumerator
OWNS_WINDOW 
GRABS_WINDOW 

Constructor & Destructor Documentation

CYISurface::CYISurface ( )
virtual CYISurface::~CYISurface ( )
virtual
CYISurface::CYISurface ( CYISurfacePriv *  m_pPriv)
protected

Member Function Documentation

void* CYISurface::GetContext ( )

Returns the device context, required for Direct3D, also allows for using multiple contexts in GL.

void* CYISurface::GetDevice ( )

Returns the device, required for Direct3D, also allows for using multiple contexts in GL.

CYIGraphicsComponents* CYISurface::GetGraphicsComponents ( )

Returns graphics components.

int32_t CYISurface::GetHeight ( ) const

Returns the height of the display in pixels.

int32_t CYISurface::GetWidth ( ) const

Returns the width of the display in pixels.

static std::unique_ptr<CYISurface> CYISurface::New ( const Config pSurfaceConfig,
WINDOW_OWNERSHIP  eWindowOwnership 
)
static

Creates a new platform-specific display class.

void CYISurface::SurfaceWasResized ( int32_t  nWidth,
int32_t  nHeight 
)

This is called by the platform to indicate that a surface has been resized. Application code should not call this function manually. It is purely in response to OS events.

virtual void CYISurface::UpdateScreen ( )
virtual

Swaps the display buffers, draws the contents of the back buffer to the screen.


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