mirror of https://github.com/axmolengine/axmol.git
[ci skip]Update comments.
This commit is contained in:
parent
89f9ae044d
commit
153d697f1a
|
@ -40,6 +40,8 @@ NS_CC_BEGIN
|
||||||
/**
|
/**
|
||||||
* @brief Possible GlyphCollection used by Label.
|
* @brief Possible GlyphCollection used by Label.
|
||||||
*
|
*
|
||||||
|
* Specify a collections of characters to be load when Label created.
|
||||||
|
* Consider using DYNAMIC.
|
||||||
*/
|
*/
|
||||||
enum class GlyphCollection {
|
enum class GlyphCollection {
|
||||||
DYNAMIC,
|
DYNAMIC,
|
||||||
|
@ -61,14 +63,16 @@ enum class LabelEffect {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @struct TTFConfig
|
* @struct TTFConfig
|
||||||
*
|
* @see `GlyphCollection`
|
||||||
*/
|
*/
|
||||||
typedef struct _ttfConfig
|
typedef struct _ttfConfig
|
||||||
{
|
{
|
||||||
std::string fontFilePath;
|
std::string fontFilePath;
|
||||||
int fontSize;
|
int fontSize;
|
||||||
|
|
||||||
GlyphCollection glyphs;
|
GlyphCollection glyphs;
|
||||||
const char *customGlyphs;
|
const char *customGlyphs;
|
||||||
|
|
||||||
bool distanceFieldEnabled;
|
bool distanceFieldEnabled;
|
||||||
int outlineSize;
|
int outlineSize;
|
||||||
|
|
||||||
|
|
|
@ -25,18 +25,18 @@ Copyright (c) 2013-2015 Chukong Technologies
|
||||||
|
|
||||||
#ifndef __CC_PLATFORM_MACROS_H__
|
#ifndef __CC_PLATFORM_MACROS_H__
|
||||||
#define __CC_PLATFORM_MACROS_H__
|
#define __CC_PLATFORM_MACROS_H__
|
||||||
/// @cond DO_NOT_SHOW
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define some platform specific macros
|
* Define some platform specific macros.
|
||||||
*/
|
*/
|
||||||
#include "base/ccConfig.h"
|
#include "base/ccConfig.h"
|
||||||
#include "platform/CCPlatformConfig.h"
|
#include "platform/CCPlatformConfig.h"
|
||||||
#include "platform/CCPlatformDefine.h"
|
#include "platform/CCPlatformDefine.h"
|
||||||
|
|
||||||
/**
|
/** @def CREATE_FUNC(__TYPE__)
|
||||||
* define a create function for a specific type, such as Layer
|
* Define a create function for a specific type, such as Layer.
|
||||||
* @param \__TYPE__ class type to add create(), such as Layer
|
*
|
||||||
|
* @param __TYPE__ class type to add create(), such as Layer.
|
||||||
*/
|
*/
|
||||||
#define CREATE_FUNC(__TYPE__) \
|
#define CREATE_FUNC(__TYPE__) \
|
||||||
static __TYPE__* create() \
|
static __TYPE__* create() \
|
||||||
|
@ -55,9 +55,10 @@ static __TYPE__* create() \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @def NODE_FUNC(__TYPE__)
|
||||||
* define a node function for a specific type, such as Layer
|
* Define a node function for a specific type, such as Layer.
|
||||||
* @param \__TYPE__ class type to add node(), such as Layer
|
*
|
||||||
|
* @param __TYPE__ class type to add node(), such as Layer.
|
||||||
* @deprecated This interface will be deprecated sooner or later.
|
* @deprecated This interface will be deprecated sooner or later.
|
||||||
*/
|
*/
|
||||||
#define NODE_FUNC(__TYPE__) \
|
#define NODE_FUNC(__TYPE__) \
|
||||||
|
@ -78,12 +79,12 @@ CC_DEPRECATED_ATTRIBUTE static __TYPE__* node() \
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @def CC_ENABLE_CACHE_TEXTURE_DATA
|
/** @def CC_ENABLE_CACHE_TEXTURE_DATA
|
||||||
Enable it if you want to cache the texture data.
|
* Enable it if you want to cache the texture data.
|
||||||
Not enabling for Emscripten any more -- doesn't seem necessary and don't want
|
* Not enabling for Emscripten any more -- doesn't seem necessary and don't want
|
||||||
to be different from other platforms unless there's a good reason.
|
* to be different from other platforms unless there's a good reason.
|
||||||
|
*
|
||||||
It's new in cocos2d-x since v0.99.5
|
* @since v0.99.5
|
||||||
*/
|
*/
|
||||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||||
#define CC_ENABLE_CACHE_TEXTURE_DATA 1
|
#define CC_ENABLE_CACHE_TEXTURE_DATA 1
|
||||||
#else
|
#else
|
||||||
|
@ -91,17 +92,18 @@ It's new in cocos2d-x since v0.99.5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN)
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN)
|
||||||
/* Application will crash in glDrawElements function on some win32 computers and some android devices.
|
/** Application will crash in glDrawElements function on some win32 computers and some android devices.
|
||||||
Indices should be bound again while drawing to avoid this bug.
|
* Indices should be bound again while drawing to avoid this bug.
|
||||||
*/
|
*/
|
||||||
#define CC_REBIND_INDICES_BUFFER 1
|
#define CC_REBIND_INDICES_BUFFER 1
|
||||||
#else
|
#else
|
||||||
#define CC_REBIND_INDICES_BUFFER 0
|
#define CC_REBIND_INDICES_BUFFER 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// generic macros
|
// Generic macros
|
||||||
|
|
||||||
// namespace cocos2d {}
|
/// @name namespace cocos2d
|
||||||
|
/// @{
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define NS_CC_BEGIN namespace cocos2d {
|
#define NS_CC_BEGIN namespace cocos2d {
|
||||||
#define NS_CC_END }
|
#define NS_CC_END }
|
||||||
|
@ -113,15 +115,18 @@ It's new in cocos2d-x since v0.99.5
|
||||||
#define USING_NS_CC
|
#define USING_NS_CC
|
||||||
#define NS_CC
|
#define NS_CC
|
||||||
#endif
|
#endif
|
||||||
|
// end of namespace group
|
||||||
|
/// @}
|
||||||
|
|
||||||
/** CC_PROPERTY_READONLY is used to declare a protected variable.
|
/** @def CC_PROPERTY_READONLY
|
||||||
We can use getter to read the variable.
|
* It is used to declare a protected variable. We can use getter to read the variable.
|
||||||
@param varType the type of variable.
|
*
|
||||||
@param varName variable name.
|
* @param varType the type of variable.
|
||||||
@param funName "get + funName" will be the name of the getter.
|
* @param varName variable name.
|
||||||
@warning The getter is a public virtual function, you should rewrite it first.
|
* @param funName "get + funName" will be the name of the getter.
|
||||||
The variables and methods declared after CC_PROPERTY_READONLY are all public.
|
* @warning The getter is a public virtual function, you should rewrite it first.
|
||||||
If you need protected or private, please declare.
|
* The variables and methods declared after CC_PROPERTY_READONLY are all public.
|
||||||
|
* If you need protected or private, please declare.
|
||||||
*/
|
*/
|
||||||
#define CC_PROPERTY_READONLY(varType, varName, funName)\
|
#define CC_PROPERTY_READONLY(varType, varName, funName)\
|
||||||
protected: varType varName;\
|
protected: varType varName;\
|
||||||
|
@ -131,15 +136,17 @@ public: virtual varType get##funName(void) const;
|
||||||
protected: varType varName;\
|
protected: varType varName;\
|
||||||
public: virtual const varType& get##funName(void) const;
|
public: virtual const varType& get##funName(void) const;
|
||||||
|
|
||||||
/** CC_PROPERTY is used to declare a protected variable.
|
/** @def CC_PROPERTY
|
||||||
We can use getter to read the variable, and use the setter to change the variable.
|
* It is used to declare a protected variable.
|
||||||
@param varType the type of variable.
|
* We can use getter to read the variable, and use the setter to change the variable.
|
||||||
@param varName variable name.
|
*
|
||||||
@param funName "get + funName" will be the name of the getter.
|
* @param varType The type of variable.
|
||||||
"set + funName" will be the name of the setter.
|
* @param varName Variable name.
|
||||||
@warning The getter and setter are public virtual functions, you should rewrite them first.
|
* @param funName "get + funName" will be the name of the getter.
|
||||||
The variables and methods declared after CC_PROPERTY are all public.
|
* "set + funName" will be the name of the setter.
|
||||||
If you need protected or private, please declare.
|
* @warning The getter and setter are public virtual functions, you should rewrite them first.
|
||||||
|
* The variables and methods declared after CC_PROPERTY are all public.
|
||||||
|
* If you need protected or private, please declare.
|
||||||
*/
|
*/
|
||||||
#define CC_PROPERTY(varType, varName, funName)\
|
#define CC_PROPERTY(varType, varName, funName)\
|
||||||
protected: varType varName;\
|
protected: varType varName;\
|
||||||
|
@ -151,14 +158,15 @@ protected: varType varName;\
|
||||||
public: virtual const varType& get##funName(void) const;\
|
public: virtual const varType& get##funName(void) const;\
|
||||||
public: virtual void set##funName(const varType& var);
|
public: virtual void set##funName(const varType& var);
|
||||||
|
|
||||||
/** CC_SYNTHESIZE_READONLY is used to declare a protected variable.
|
/** @def CC_SYNTHESIZE_READONLY
|
||||||
We can use getter to read the variable.
|
* It is used to declare a protected variable. We can use getter to read the variable.
|
||||||
@param varType the type of variable.
|
*
|
||||||
@param varName variable name.
|
* @param varType The type of variable.
|
||||||
@param funName "get + funName" will be the name of the getter.
|
* @param varName Variable name.
|
||||||
@warning The getter is a public inline function.
|
* @param funName "get + funName" will be the name of the getter.
|
||||||
The variables and methods declared after CC_SYNTHESIZE_READONLY are all public.
|
* @warning The getter is a public inline function.
|
||||||
If you need protected or private, please declare.
|
* The variables and methods declared after CC_SYNTHESIZE_READONLY are all public.
|
||||||
|
* If you need protected or private, please declare.
|
||||||
*/
|
*/
|
||||||
#define CC_SYNTHESIZE_READONLY(varType, varName, funName)\
|
#define CC_SYNTHESIZE_READONLY(varType, varName, funName)\
|
||||||
protected: varType varName;\
|
protected: varType varName;\
|
||||||
|
@ -168,15 +176,17 @@ public: virtual varType get##funName(void) const { return varName; }
|
||||||
protected: varType varName;\
|
protected: varType varName;\
|
||||||
public: virtual const varType& get##funName(void) const { return varName; }
|
public: virtual const varType& get##funName(void) const { return varName; }
|
||||||
|
|
||||||
/** CC_SYNTHESIZE is used to declare a protected variable.
|
/** @def CC_SYNTHESIZE
|
||||||
We can use getter to read the variable, and use the setter to change the variable.
|
* It is used to declare a protected variable.
|
||||||
@param varType the type of variable.
|
* We can use getter to read the variable, and use the setter to change the variable.
|
||||||
@param varName variable name.
|
*
|
||||||
@param funName "get + funName" will be the name of the getter.
|
* @param varType The type of variable.
|
||||||
"set + funName" will be the name of the setter.
|
* @param varName Variable name.
|
||||||
@warning The getter and setter are public inline functions.
|
* @param funName "get + funName" will be the name of the getter.
|
||||||
The variables and methods declared after CC_SYNTHESIZE are all public.
|
* "set + funName" will be the name of the setter.
|
||||||
If you need protected or private, please declare.
|
* @warning The getter and setter are public inline functions.
|
||||||
|
* The variables and methods declared after CC_SYNTHESIZE are all public.
|
||||||
|
* If you need protected or private, please declare.
|
||||||
*/
|
*/
|
||||||
#define CC_SYNTHESIZE(varType, varName, funName)\
|
#define CC_SYNTHESIZE(varType, varName, funName)\
|
||||||
protected: varType varName;\
|
protected: varType varName;\
|
||||||
|
@ -212,7 +222,8 @@ public: virtual void set##funName(varType var) \
|
||||||
#define __CCLOGWITHFUNCTION(s, ...) \
|
#define __CCLOGWITHFUNCTION(s, ...) \
|
||||||
log("%s : %s",__FUNCTION__, StringUtils::format(s, ##__VA_ARGS__).c_str())
|
log("%s : %s",__FUNCTION__, StringUtils::format(s, ##__VA_ARGS__).c_str())
|
||||||
|
|
||||||
// cocos2d debug
|
/// @name Cocos2d debug
|
||||||
|
/// @{
|
||||||
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0
|
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0
|
||||||
#define CCLOG(...) do {} while (0)
|
#define CCLOG(...) do {} while (0)
|
||||||
#define CCLOGINFO(...) do {} while (0)
|
#define CCLOGINFO(...) do {} while (0)
|
||||||
|
@ -232,15 +243,20 @@ public: virtual void set##funName(varType var) \
|
||||||
#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__)
|
#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__)
|
||||||
#endif // COCOS2D_DEBUG
|
#endif // COCOS2D_DEBUG
|
||||||
|
|
||||||
// Lua engine debug
|
/** Lua engine debug */
|
||||||
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 || CC_LUA_ENGINE_DEBUG == 0
|
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 || CC_LUA_ENGINE_DEBUG == 0
|
||||||
#define LUALOG(...)
|
#define LUALOG(...)
|
||||||
#else
|
#else
|
||||||
#define LUALOG(format, ...) cocos2d::log(format, ##__VA_ARGS__)
|
#define LUALOG(format, ...) cocos2d::log(format, ##__VA_ARGS__)
|
||||||
#endif // Lua engine debug
|
#endif // Lua engine debug
|
||||||
|
|
||||||
// A macro to disallow the copy constructor and operator= functions
|
// end of debug group
|
||||||
// This should be used in the private: declarations for a class
|
/// @}
|
||||||
|
|
||||||
|
/** @def CC_DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||||
|
* A macro to disallow the copy constructor and operator= functions.
|
||||||
|
* This should be used in the private: declarations for a class
|
||||||
|
*/
|
||||||
#if defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUG__ == 4) && (__GNUC_MINOR__ >= 4))) \
|
#if defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUG__ == 4) && (__GNUC_MINOR__ >= 4))) \
|
||||||
|| (defined(__clang__) && (__clang_major__ >= 3)) || (_MSC_VER >= 1800)
|
|| (defined(__clang__) && (__clang_major__ >= 3)) || (_MSC_VER >= 1800)
|
||||||
#define CC_DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
#define CC_DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||||
|
@ -252,18 +268,20 @@ public: virtual void set##funName(varType var) \
|
||||||
TypeName &operator =(const TypeName &);
|
TypeName &operator =(const TypeName &);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// A macro to disallow all the implicit constructors, namely the
|
/** @def CC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)
|
||||||
// default constructor, copy constructor and operator= functions.
|
* A macro to disallow all the implicit constructors, namely the
|
||||||
//
|
* default constructor, copy constructor and operator= functions.
|
||||||
// This should be used in the private: declarations for a class
|
*
|
||||||
// that wants to prevent anyone from instantiating it. This is
|
* This should be used in the private: declarations for a class
|
||||||
// especially useful for classes containing only static methods.
|
* that wants to prevent anyone from instantiating it. This is
|
||||||
|
* especially useful for classes containing only static methods.
|
||||||
|
*/
|
||||||
#define CC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
|
#define CC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
|
||||||
TypeName(); \
|
TypeName(); \
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(TypeName)
|
CC_DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||||
|
|
||||||
/*
|
/** @def CC_DEPRECATED_ATTRIBUTE
|
||||||
* only certain compilers support __attribute__((deprecated))
|
* Only certain compilers support __attribute__((deprecated)).
|
||||||
*/
|
*/
|
||||||
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||||
#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
||||||
|
@ -273,17 +291,18 @@ public: virtual void set##funName(varType var) \
|
||||||
#define CC_DEPRECATED_ATTRIBUTE
|
#define CC_DEPRECATED_ATTRIBUTE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/** @def CC_DEPRECATED(...)
|
||||||
* macro to mark things deprecated as of a particular version
|
* Macro to mark things deprecated as of a particular version
|
||||||
* can be used with artibrary parameters which are thrown away
|
* can be used with artibrary parameters which are thrown away.
|
||||||
* e.g. CC_DEPRECATED(4.0) or CC_DEPRECATED(4.0, "not going to need this anymore") etc.
|
* e.g. CC_DEPRECATED(4.0) or CC_DEPRECATED(4.0, "not going to need this anymore") etc.
|
||||||
*/
|
*/
|
||||||
#define CC_DEPRECATED(...) CC_DEPRECATED_ATTRIBUTE
|
#define CC_DEPRECATED(...) CC_DEPRECATED_ATTRIBUTE
|
||||||
|
|
||||||
/*
|
/** @def CC_FORMAT_PRINTF(formatPos, argPos)
|
||||||
* only certain compiler support __attribute__((format))
|
* Only certain compiler support __attribute__((format))
|
||||||
* formatPos - 1-based position of format string argument
|
*
|
||||||
* argPos - 1-based position of first format-dependent argument
|
* @param formatPos 1-based position of format string argument.
|
||||||
|
* @param argPos 1-based position of first format-dependent argument.
|
||||||
*/
|
*/
|
||||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||||
#define CC_FORMAT_PRINTF(formatPos, argPos) __attribute__((__format__(printf, formatPos, argPos)))
|
#define CC_FORMAT_PRINTF(formatPos, argPos) __attribute__((__format__(printf, formatPos, argPos)))
|
||||||
|
@ -307,9 +326,9 @@ public: virtual void set##funName(varType var) \
|
||||||
#define CC_UNUSED
|
#define CC_UNUSED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
/** @def CC_REQUIRES_NULL_TERMINATION
|
||||||
// CC_REQUIRES_NULL_TERMINATION
|
*
|
||||||
//
|
*/
|
||||||
#if !defined(CC_REQUIRES_NULL_TERMINATION)
|
#if !defined(CC_REQUIRES_NULL_TERMINATION)
|
||||||
#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 5549)
|
#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 5549)
|
||||||
#define CC_REQUIRES_NULL_TERMINATION __attribute__((sentinel(0,1)))
|
#define CC_REQUIRES_NULL_TERMINATION __attribute__((sentinel(0,1)))
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Copyright (c) 2011 Ricardo Quesada
|
Copyright (c) 2011 Ricardo Quesada
|
||||||
Copyright (c) 2010-2012 cocos2d-x.org
|
Copyright (c) 2010-2012 cocos2d-x.org
|
||||||
Copyright (c) 2011 Zynga Inc.
|
Copyright (c) 2011 Zynga Inc.
|
||||||
Copyright (C) 2013-2014 Chukong Technologies Inc.
|
Copyright (C) 2013-2015 Chukong Technologies Inc.
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ THE SOFTWARE.
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup shaders
|
* @addtogroup support
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class GLProgram;
|
||||||
|
|
||||||
namespace GL {
|
namespace GL {
|
||||||
|
|
||||||
/** vertex attrib flags */
|
/** Vertex attrib flags. */
|
||||||
enum {
|
enum {
|
||||||
VERTEX_ATTRIB_FLAG_NONE = 0,
|
VERTEX_ATTRIB_FLAG_NONE = 0,
|
||||||
|
|
||||||
|
@ -58,95 +58,116 @@ enum {
|
||||||
VERTEX_ATTRIB_FLAG_POS_COLOR_TEX = (VERTEX_ATTRIB_FLAG_POSITION | VERTEX_ATTRIB_FLAG_COLOR | VERTEX_ATTRIB_FLAG_TEX_COORD),
|
VERTEX_ATTRIB_FLAG_POS_COLOR_TEX = (VERTEX_ATTRIB_FLAG_POSITION | VERTEX_ATTRIB_FLAG_COLOR | VERTEX_ATTRIB_FLAG_TEX_COORD),
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @file ccGLStateCache.h
|
/**
|
||||||
*/
|
* Invalidates the GL state cache.
|
||||||
|
*
|
||||||
/** Invalidates the GL state cache.
|
* If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.
|
||||||
If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.
|
* @since v2.0.0
|
||||||
@since v2.0.0
|
|
||||||
*/
|
*/
|
||||||
void CC_DLL invalidateStateCache(void);
|
void CC_DLL invalidateStateCache(void);
|
||||||
|
|
||||||
/** Uses the GL program in case program is different than the current one.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glUseProgram() directly.
|
* Uses the GL program in case program is different than the current one.
|
||||||
@since v2.0.0
|
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glUseProgram() directly.
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL useProgram(GLuint program);
|
void CC_DLL useProgram(GLuint program);
|
||||||
|
|
||||||
/** Deletes the GL program. If it is the one that is being used, it invalidates it.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glDeleteProgram() directly.
|
* Deletes the GL program. If it is the one that is being used, it invalidates it.
|
||||||
@since v2.0.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glDeleteProgram() directly.
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL deleteProgram(GLuint program);
|
void CC_DLL deleteProgram(GLuint program);
|
||||||
|
|
||||||
/** Uses a blending function in case it not already used.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glBlendFunc() directly.
|
* Uses a blending function in case it not already used.
|
||||||
@since v2.0.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glBlendFunc() directly.
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL blendFunc(GLenum sfactor, GLenum dfactor);
|
void CC_DLL blendFunc(GLenum sfactor, GLenum dfactor);
|
||||||
|
|
||||||
/** Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation().
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD.
|
* Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation().
|
||||||
@since v2.0.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD.
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL blendResetToCache(void);
|
void CC_DLL blendResetToCache(void);
|
||||||
|
|
||||||
/** sets the projection matrix as dirty
|
/**
|
||||||
@since v2.0.0
|
* Sets the projection matrix as dirty.
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL setProjectionMatrixDirty(void);
|
void CC_DLL setProjectionMatrixDirty(void);
|
||||||
|
|
||||||
/** Will enable the vertex attribs that are passed as flags.
|
/**
|
||||||
Possible flags:
|
* Will enable the vertex attribs that are passed as flags.
|
||||||
|
* Possible flags:
|
||||||
* VERTEX_ATTRIB_FLAG_POSITION
|
*
|
||||||
* VERTEX_ATTRIB_FLAG_COLOR
|
* * VERTEX_ATTRIB_FLAG_POSITION
|
||||||
* VERTEX_ATTRIB_FLAG_TEX_COORDS
|
* * VERTEX_ATTRIB_FLAG_COLOR
|
||||||
|
* * VERTEX_ATTRIB_FLAG_TEX_COORDS
|
||||||
These flags can be ORed. The flags that are not present, will be disabled.
|
*
|
||||||
|
* These flags can be ORed. The flags that are not present, will be disabled.
|
||||||
@since v2.0.0
|
*
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL enableVertexAttribs(uint32_t flags);
|
void CC_DLL enableVertexAttribs(uint32_t flags);
|
||||||
|
|
||||||
/** If the texture is not already bound to texture unit 0, it binds it.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
* If the texture is not already bound to texture unit 0, it binds it.
|
||||||
@since v2.0.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL bindTexture2D(GLuint textureId);
|
void CC_DLL bindTexture2D(GLuint textureId);
|
||||||
|
|
||||||
|
|
||||||
/** If the texture is not already bound to a given unit, it binds it.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
* If the texture is not already bound to a given unit, it binds it.
|
||||||
@since v2.1.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
||||||
|
* @since v2.1.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL bindTexture2DN(GLuint textureUnit, GLuint textureId);
|
void CC_DLL bindTexture2DN(GLuint textureUnit, GLuint textureId);
|
||||||
|
|
||||||
/** It will delete a given texture. If the texture was bound, it will invalidate the cached.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
* It will delete a given texture. If the texture was bound, it will invalidate the cached.
|
||||||
@since v2.0.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL deleteTexture(GLuint textureId);
|
void CC_DLL deleteTexture(GLuint textureId);
|
||||||
|
|
||||||
/** It will delete a given texture. If the texture was bound, it will invalidate the cached for the given texture unit.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
* It will delete a given texture. If the texture was bound, it will invalidate the cached for the given texture unit.
|
||||||
@since v2.1.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
||||||
|
* @since v2.1.0
|
||||||
*/
|
*/
|
||||||
CC_DEPRECATED_ATTRIBUTE void CC_DLL deleteTextureN(GLuint textureUnit, GLuint textureId);
|
CC_DEPRECATED_ATTRIBUTE void CC_DLL deleteTextureN(GLuint textureUnit, GLuint textureId);
|
||||||
|
|
||||||
/** Select active texture unit.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.
|
* Select active texture unit.
|
||||||
@since v3.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glActiveTexture() directly.
|
||||||
|
* @since v3.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL activeTexture(GLenum texture);
|
void CC_DLL activeTexture(GLenum texture);
|
||||||
|
|
||||||
/** If the vertex array is not already bound, it binds it.
|
/**
|
||||||
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly.
|
* If the vertex array is not already bound, it binds it.
|
||||||
@since v2.0.0
|
*
|
||||||
|
* If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly.
|
||||||
|
* @since v2.0.0
|
||||||
*/
|
*/
|
||||||
void CC_DLL bindVAO(GLuint vaoId);
|
void CC_DLL bindVAO(GLuint vaoId);
|
||||||
|
|
||||||
// end of shaders group
|
// end of support group
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
} // Namespace GL
|
} // Namespace GL
|
||||||
|
|
Loading…
Reference in New Issue