You.i Engine
YiCapabilities.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_CAPABILITIES_H_
3 #define _YI_CAPABILITIES_H_
4 
5 #include "framework/YiPredef.h"
6 #include "utility/YiString.h"
7 
13 static const int32_t YI_MAX_GL_STRING_SIZE = 256;
14 
15 struct SYI_CAPS
16 {
18  bFrameBufferObjects(false),
19  bStandardDerivatives(false),
22  bTextureNPOT(false),
23  bMipmapNPOT(true),
25  bDepthTextures(false),
26  bPackedDepthStencil(false),
27  nMaxTextureSize(0),
28  nVertAttributes(0),
31  nVaryingVectors(0),
35  nSizeRedBits(0),
36  nSizeGreenBits(0),
37  nSizeBlueBits(0),
38  nSizeAlphaBits(0),
39  nSizeDepthBits(0),
41  {}
42 
48 
49  bool bFrameBufferObjects; //True if FBOs are supported, false otherwise.
50  bool bStandardDerivatives; //True if Standard Derivatives are supported, false otherwise.
51 
52  //Texture caps & limits
53  bool bCompressedEtc1RGB8Texture; //implements GL_OES_compressed_ETC1_RGB8_texture extension.
54  bool bTextureFormatBGRA8888; //implements GL_EXT_texture_format_BGRA8888 extension.
55  bool bTextureNPOT; //implements GL_OES_texture_npot extension.
56  bool bMipmapNPOT; //can use NPOT mipmaps.
57  bool bMipmapNPOTWithGoodQuality; //generates proper NPOT mipmaps.
58  bool bDepthTextures; //implements GL_OES_depth_texture extension
59  bool bPackedDepthStencil; //implements GL_OES_packed_depth_stencil
60  int32_t nMaxTextureSize; //this is a single value representing the largest square texture size.
61 
62  //Shader Limits
63  int32_t nVertAttributes;
66  int32_t nVaryingVectors;
70 
71  //General caps
72  int32_t nSizeRedBits;
73  int32_t nSizeGreenBits;
74  int32_t nSizeBlueBits;
75  int32_t nSizeAlphaBits;
76  int32_t nSizeDepthBits;
78 };
79 
80 class CYICapabilitiesPriv;
81 
86 {
87 public:
88  CYICapabilities(void);
89  virtual ~CYICapabilities(void);
90 
91  void InitCapabilities();
92  const SYI_CAPS *GetDeviceCapabilities() const;
93  const SYI_CAPS *GetAPICapabilities() const; //Minimum caps imposed by underlying rendering API spec.
94 
95  CYIString GetCapsReport() const;
96  void LogCapsReport(const CYIString &filename) const;
97 
98 private:
99  CYICapabilitiesPriv *m_pPriv;
100 
102 };
103 
106 #endif // _YI_CAPABILITIES_H_
#define YI_DISALLOW_COPY_AND_ASSIGN(TypeName)
Delete the copy constructor and assignment operator (and consequently the move constructor as well) ...
Definition: YiPredef.h:114
bool bStandardDerivatives
Definition: YiCapabilities.h:50
int32_t nSizeGreenBits
Definition: YiCapabilities.h:73
bool bCompressedEtc1RGB8Texture
Definition: YiCapabilities.h:53
int32_t nCombinedTextureImageUnits
Definition: YiCapabilities.h:67
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
bool bTextureFormatBGRA8888
Definition: YiCapabilities.h:54
CYIString extensions
Definition: YiCapabilities.h:43
int32_t nMaxTextureSize
Definition: YiCapabilities.h:60
bool bDepthTextures
Definition: YiCapabilities.h:58
int32_t nVertTextureImageUnits
Definition: YiCapabilities.h:68
bool bMipmapNPOT
Definition: YiCapabilities.h:56
int32_t nSizeRedBits
Definition: YiCapabilities.h:72
Definition: YiCapabilities.h:85
int32_t nSizeAlphaBits
Definition: YiCapabilities.h:75
CYIString renderer
Definition: YiCapabilities.h:45
int32_t nFragUniformVectors
Definition: YiCapabilities.h:65
bool bMipmapNPOTWithGoodQuality
Definition: YiCapabilities.h:57
Definition: YiCapabilities.h:15
int32_t nSizeDepthBits
Definition: YiCapabilities.h:76
bool bFrameBufferObjects
Definition: YiCapabilities.h:49
CYIString openglVersion
Definition: YiCapabilities.h:46
int32_t nVaryingVectors
Definition: YiCapabilities.h:66
CYIString vendor
Definition: YiCapabilities.h:44
bool bPackedDepthStencil
Definition: YiCapabilities.h:59
CYIString shadingLanguageVersion
Definition: YiCapabilities.h:47
int32_t nFragTextureImageUnits
Definition: YiCapabilities.h:69
int32_t nSizeBlueBits
Definition: YiCapabilities.h:74
int32_t nSizeStencilBits
Definition: YiCapabilities.h:77
SYI_CAPS()
Definition: YiCapabilities.h:17
bool bTextureNPOT
Definition: YiCapabilities.h:55
int32_t nVertAttributes
Definition: YiCapabilities.h:63
int32_t nVertUniformVectors
Definition: YiCapabilities.h:64