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>


struct  Config

Public Types

enum  WindowOwnership {

Public Member Functions

 CYISurface ()
virtual ~CYISurface ()
virtual void UpdateScreen ()
void SetSwapInterval (uint32_t swapInterval)
uint32_t GetSwapInterval () const
int32_t GetWidth () const
int32_t GetHeight () const
CYIGraphicsComponentsGetGraphicsComponents ()
void * GetDevice ()
void * GetContext ()
void SurfaceWasResized (int32_t width, int32_t height)

Static Public Member Functions

static std::unique_ptr< CYISurfaceNew (const Config *pSurfaceConfig, WindowOwnership windowOwnership)


class CYISurfacePriv

Member Enumeration Documentation

◆ WindowOwnership


Constructor & Destructor Documentation

◆ CYISurface()

CYISurface::CYISurface ( )

◆ ~CYISurface()

virtual CYISurface::~CYISurface ( )

Member Function Documentation

◆ GetContext()

void* CYISurface::GetContext ( )

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

◆ GetDevice()

void* CYISurface::GetDevice ( )

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

◆ GetGraphicsComponents()

CYIGraphicsComponents* CYISurface::GetGraphicsComponents ( )

Returns graphics components.

◆ GetHeight()

int32_t CYISurface::GetHeight ( ) const

Returns the height of the display in pixels.

◆ GetSwapInterval()

uint32_t CYISurface::GetSwapInterval ( ) const

Returns the swap interval

See also

◆ GetWidth()

int32_t CYISurface::GetWidth ( ) const

Returns the width of the display in pixels.

◆ New()

static std::unique_ptr<CYISurface> CYISurface::New ( const Config pSurfaceConfig,
WindowOwnership  windowOwnership 

Creates a new platform-specific display class.

◆ SetSwapInterval()

void CYISurface::SetSwapInterval ( uint32_t  swapInterval)

Configures the display's swap interval. The swap interval is the number of v-blanks that should occur before the front and back buffers are swapped (if applicable). A swap interval of zero indicates that the frames should be swapped as soon as they're ready, regardless of the display's refresh interval. The default value is 1.

◆ SurfaceWasResized()

void CYISurface::SurfaceWasResized ( int32_t  width,
int32_t  height 

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.

◆ UpdateScreen()

virtual void CYISurface::UpdateScreen ( )

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

Friends And Related Function Documentation

◆ CYISurfacePriv

friend class CYISurfacePriv

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