You.i Engine
YiSurface.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_SURFACE_H_
3 #define _YI_SURFACE_H_
4 
5 #include "framework/YiPredef.h"
6 
7 #include <memory>
8 
14 class IYIBufferFactory;
15 class IYIMaterialFactory;
16 class IYIRenderer;
17 class IYIShaderProgram;
18 
20 class CYIMeshFactory;
21 class CYISurfacePriv;
22 class CYIString;
23 
29 {
30 public:
34  typedef struct
35  {
36  int32_t nWidth;
37  int32_t nHeight;
40  } Config;
41 
45  };
46 
47  CYISurface();
48  virtual ~CYISurface();
49 
53  static std::unique_ptr<CYISurface> New(const Config *pSurfaceConfig, WINDOW_OWNERSHIP eWindowOwnership);
54 
58  virtual void UpdateScreen();
59 
63  int32_t GetWidth() const;
64 
68  int32_t GetHeight() const;
69 
74 
78  void *GetDevice();
79 
83  void *GetContext();
84 
89  void SurfaceWasResized(int32_t nWidth, int32_t nHeight);
90 
91 protected:
92  CYISurface(CYISurfacePriv *m_pPriv);
93 
94 private:
95 
96  CYISurface(const CYISurface &);
97  const CYISurface &operator =(const CYISurface &);
98 
99  CYISurfacePriv *m_pPriv;
100 };
101 
104 #endif // _YI_SURFACE_H_
CYIGraphicsComponents * GetGraphicsComponents()
Definition: YiGraphicsComponents.h:20
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
Definition: YiSurface.h:34
int32_t nHeight
Definition: YiSurface.h:37
Material Factory interface for the generation of all things texture and shader related.
Definition: YiMaterialFactory.h:23
virtual ~CYISurface()
static std::unique_ptr< CYISurface > New(const Config *pSurfaceConfig, WINDOW_OWNERSHIP eWindowOwnership)
void SurfaceWasResized(int32_t nWidth, int32_t nHeight)
void * pDevicePrivate
Definition: YiSurface.h:39
bool bFullScreen
Definition: YiSurface.h:38
WINDOW_OWNERSHIP
Definition: YiSurface.h:42
Definition: YiSurface.h:43
int32_t GetHeight() const
int32_t GetWidth() const
Definition: YiSurface.h:28
Factory for the creation of Vertex and Index buffers.
Definition: YiBufferFactory.h:18
Factory for the creation of meshes.
Definition: YiMeshFactory.h:20
This class provides a common interface for creating and interacting with shader programs.
Definition: YiShaderProgram.h:29
int32_t nWidth
Definition: YiSurface.h:36
Definition: YiSurface.h:44
void * GetDevice()
void * GetContext()
Definition: YiRenderer.h:34
virtual void UpdateScreen()