⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.
|
Axmol Engine 3.0.0-dff292a
|
Environment contains some Engine caps and user settings. More...
#include <Environment.h>
Public Member Functions | |
| virtual | ~Environment () |
| Destructor @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 Environment dictionary. | |
| std::string | getInfo () const |
| Returns the Environment info. | |
| void | gatherGPUInfo () |
| Gathers OpenGL / GPU information. | |
| void | loadConfigFile (std::string_view filename) |
| Loads a config file. | |
Static Public Member Functions | |
| static Environment * | getInstance () |
| Returns a shared instance of Environment. | |
| static void | destroyInstance () |
| Purge the shared instance of Environment. | |
Environment contains some Engine caps and user settings.
|
static |
Returns a shared instance of Environment.
| 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.
OpenGL ES 2.0 already supports NPOT (iOS).
| 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.
On Desktop it returns true. On Mobile it checks for the extension GL_OES_mapbuffer
| 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.
| 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.
| key | A given key. |
| defaultValue | if not find the value, return the defaultValue. |
| void setValue | ( | std::string_view | key, |
| const Value & | value ) |
Sets a new key/value pair in the Environment dictionary.
| key | A given key. |
| value | A given value. |
| std::string getInfo | ( | ) | const |
Returns the Environment info.
| 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.
| filename | Config file name. |