Class cc.Configuration

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.Configuration contains some openGL variables

Method Summary

Class Detail

cc.Configuration()
cc.Configuration contains some openGL variables

Method Detail

  • checkForGLExtension(searchName)
    returns whether or not an OpenGL is supported
    Parameters:
    {String} searchName
  • dumpInfo()
    dumps the current configuration on the console
  • gatherGPUInfo()
    gathers OpenGL / GPU information
  • {boolean} getBool(key, default_value)
    returns the value of a given key as a boolean. If the key is not found, it will return the default value
    Parameters:
    {string} key
    {boolean|null} default_value Optional, Default: false
    Returns:
    {boolean}
  • {String} getCString(key, default_value)
    returns the value of a given key as a string. If the key is not found, it will return the default value
    Parameters:
    {String} key
    {String} default_value Optional, Default: null
    Returns:
    {String}
  • <static> {cc.Configuration} cc.Configuration.getInstance()
    returns a shared instance of CCConfiguration
    Returns:
    {cc.Configuration}
  • {Number} getMaxModelviewStackDepth()
    OpenGL Max Modelview Stack Depth.
    Returns:
    {Number}
  • {Number} getMaxTextureSize()
    OpenGL Max texture size.
    Returns:
    {Number}
  • {Number} getMaxTextureUnits()
    returns the maximum texture units
    Returns:
    {Number}
  • {number} getNumber(key, default_value)
    returns the value of a given key as a double. If the key is not found, it will return the default value
    Parameters:
    {string} key
    {number} default_value Optional, Default: 0
    Returns:
    {number}
  • {Object|null} getObject(key)
    returns the value of a given key as a double
    Parameters:
    {string} key
    Returns:
    {Object|null}
  • loadConfigFile(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:
    {string} filename
  • <static> cc.Configuration.purgeConfiguration()
    purge the shared instance of CCConfiguration
  • setObject(key, value)
    sets a new key/value pair in the configuration dictionary
    Parameters:
    {string} key
    {Object} value
  • {Boolean} supportsBGRA8888()
    Whether or not BGRA8888 textures are supported.
    Returns:
    {Boolean}
  • {Boolean} supportsDiscardFramebuffer()
    Whether or not glDiscardFramebufferEXT is supported
    Returns:
    {Boolean}
  • {Boolean} supportsNPOT()
    Whether or not the GPU supports NPOT (Non Power Of Two) textures. OpenGL ES 2.0 already supports NPOT (iOS).
    Returns:
    {Boolean}
  • {Boolean} supportsPVRTC()
    Whether or not PVR Texture Compressed is supported
    Returns:
    {Boolean}
  • {Boolean} supportsShareableVAO()
    Whether or not shareable VAOs are supported.
    Returns:
    {Boolean}