⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.

 
Axmol Engine 2.4.0-ce063c5
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Loading...
Searching...
No Matches
Configuration Class Reference

Configuration contains some openGL variables. More...

#include <Configuration.h>

Public Member Functions

virtual ~Configuration ()
 Destructor @js NA @lua NA.
 
int getMaxTextureSize () const
 OpenGL Max texture size.
 
int getMaxModelviewStackDepth () const
 OpenGL Max Modelview Stack Depth.
 
int getMaxTextureUnits () const
 Returns the maximum texture units.
 
bool supportsNPOT () const
 Whether or not the GPU supports NPOT (Non Power Of Two) textures.
 
bool supportsPVRTC () const
 Whether or not PVR Texture Compressed is supported.
 
bool supportsETC1 () const
 Whether or not ETC1 Texture Compressed is supported.
 
bool supportsETC2 () const
 Whether or not ETC2 Texture Compressed is supported.
 
bool supportsS3TC () const
 Whether or not S3TC Texture Compressed is supported.
 
bool supportsATITC () const
 Whether or not ATITC Texture Compressed is supported.
 
bool supportsASTC () const
 Whether or not ASTC Texture Compressed is supported.
 
bool supportsBGRA8888 () const
 Whether or not BGRA8888 textures are supported.
 
bool supportsDiscardFramebuffer () const
 Whether or not glDiscardFramebufferEXT is supported.
 
bool supportsShareableVAO () const
 Whether or not shareable VAOs are supported.
 
bool supportsOESDepth24 () const
 Whether or not OES_depth24 is supported.
 
bool supportsOESPackedDepthStencil () const
 Whether or not OES_Packed_depth_stencil is supported.
 
bool supportsMapBuffer () const
 Whether or not glMapBuffer() is supported.
 
int getMaxSupportDirLightInShader () const
 Max supported directional lights in a shader, for MeshRenderer.
 
int getMaxSupportPointLightInShader () const
 Max supported point lights in a shader, for MeshRenderer.
 
int getMaxSupportSpotLightInShader () const
 Max supported spot lights in a shader, for MeshRenderer.
 
Animate3DQuality getAnimate3DQuality () const
 get 3d animate quality
 
bool init ()
 Initialize method.
 
const Value & getValue (std::string_view key, const Value &defaultValue=Value::Null) const
 Returns the value of a given key as a double.
 
void setValue (std::string_view key, const Value &value)
 Sets a new key/value pair in the configuration dictionary.
 
std::string getInfo () const
 Returns the Configuration info.
 
void gatherGPUInfo ()
 Gathers OpenGL / GPU information.
 
void loadConfigFile (std::string_view filename)
 Loads a config file.
 

Static Public Member Functions

static ConfigurationgetInstance ()
 Returns a shared instance of Configuration.
 
static void destroyInstance ()
 Purge the shared instance of Configuration.
 

Detailed Description

Configuration contains some openGL variables.

Since
v0.99.0 @js NA

Member Function Documentation

◆ getInstance()

static Configuration * getInstance ( )
static

Returns a shared instance of Configuration.

Returns
An autoreleased Configuration object.

◆ getMaxTextureSize()

int getMaxTextureSize ( ) const

OpenGL Max texture size.

Returns
The OpenGL Max texture size.

◆ getMaxModelviewStackDepth()

int getMaxModelviewStackDepth ( ) const

OpenGL Max Modelview Stack Depth.

Returns
The OpenGL Max Modelview Stack Depth.

◆ getMaxTextureUnits()

int getMaxTextureUnits ( ) const

Returns the maximum texture units.

Returns
The maximum texture units.
Since
v2.0.0

◆ supportsNPOT()

bool supportsNPOT ( ) const

Whether or not the GPU supports NPOT (Non Power Of Two) textures.

OpenGL ES 2.0 already supports NPOT (iOS).

Returns
Is true if supports NPOT.
Since
v0.99.2

◆ supportsPVRTC()

bool supportsPVRTC ( ) const

Whether or not PVR Texture Compressed is supported.

Returns
Is true if supports PVR Texture Compressed.

◆ supportsETC1()

bool supportsETC1 ( ) const

Whether or not ETC1 Texture Compressed is supported.

Returns
Is true if supports ETC1 Texture Compressed.

◆ supportsETC2()

bool supportsETC2 ( ) const

Whether or not ETC2 Texture Compressed is supported.

Returns
Is true if supports ETC2 Texture Compressed.

◆ supportsS3TC()

bool supportsS3TC ( ) const

Whether or not S3TC Texture Compressed is supported.

Returns
Is true if supports S3TC Texture Compressed.

◆ supportsATITC()

bool supportsATITC ( ) const

Whether or not ATITC Texture Compressed is supported.

Returns
Is true if supports ATITC Texture Compressed.

◆ supportsASTC()

bool supportsASTC ( ) const

Whether or not ASTC Texture Compressed is supported.

Returns
Is true if supports ASTC Texture Compressed.

◆ supportsBGRA8888()

bool supportsBGRA8888 ( ) const

Whether or not BGRA8888 textures are supported.

Returns
Is true if supports BGRA8888 textures.
Since
v0.99.2

◆ supportsDiscardFramebuffer()

bool supportsDiscardFramebuffer ( ) const

Whether or not glDiscardFramebufferEXT is supported.

Returns
Is true if supports glDiscardFramebufferEXT.
Since
v0.99.2

◆ supportsShareableVAO()

bool supportsShareableVAO ( ) const

Whether or not shareable VAOs are supported.

Returns
Is true if supports shareable VAOs.
Since
v2.0.0

◆ supportsOESDepth24()

bool supportsOESDepth24 ( ) const

Whether or not OES_depth24 is supported.

Returns
Is true if supports OES_depth24.
Since
v2.0.0

◆ supportsOESPackedDepthStencil()

bool supportsOESPackedDepthStencil ( ) const

Whether or not OES_Packed_depth_stencil is supported.

Returns
Is true if supports OES_Packed_depth_stencil.
Since
v2.0.0

◆ supportsMapBuffer()

bool supportsMapBuffer ( ) const

Whether or not glMapBuffer() is supported.

On Desktop it returns true. On Mobile it checks for the extension GL_OES_mapbuffer

Returns
Whether or not glMapBuffer() is supported.
Since
v3.13

◆ getMaxSupportDirLightInShader()

int getMaxSupportDirLightInShader ( ) const

Max supported directional lights in a shader, for MeshRenderer.

Returns
Maximum supported directional lights in a shader.
Since
v3.3

◆ getMaxSupportPointLightInShader()

int getMaxSupportPointLightInShader ( ) const

Max supported point lights in a shader, for MeshRenderer.

Returns
Maximum supported point lights in a shader.
Since
v3.3

◆ getMaxSupportSpotLightInShader()

int getMaxSupportSpotLightInShader ( ) const

Max supported spot lights in a shader, for MeshRenderer.

Returns
Maximum supported spot lights in a shader.
Since
v3.3

◆ init()

bool init ( )

Initialize method.

Returns
Is true if initialize success.

◆ getValue()

const Value & getValue ( std::string_view key,
const Value & defaultValue = Value::Null ) const

Returns the value of a given key as a double.

Parameters
keyA given key.
defaultValueif not find the value, return the defaultValue.
Returns

◆ setValue()

void setValue ( std::string_view key,
const Value & value )

Sets a new key/value pair in the configuration dictionary.

Parameters
keyA given key.
valueA given value.

◆ getInfo()

std::string getInfo ( ) const

Returns the Configuration info.

Returns
The Configuration info.

◆ loadConfigFile()

void loadConfigFile ( std::string_view filename)

Loads a config file.

If the keys are already present, then they are going to be replaced. Otherwise the new keys are added.

Parameters
filenameConfig file name.

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