optimise QuadCommand::init()

This commit is contained in:
Huabing.Xu 2014-12-30 14:21:33 +08:00
parent 2348e5c247
commit 6576c16fe1
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ QuadCommand::QuadCommand()
_type = RenderCommand::Type::QUAD_COMMAND; _type = RenderCommand::Type::QUAD_COMMAND;
} }
void QuadCommand::init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, V3F_C4B_T2F_Quad* quad, ssize_t quadCount, const Mat4 &mv) void QuadCommand::init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quad, ssize_t quadCount, const Mat4 &mv)
{ {
CCASSERT(glProgramState, "Invalid GLProgramState"); CCASSERT(glProgramState, "Invalid GLProgramState");
CCASSERT(glProgramState->getVertexAttribsFlags() == 0, "No custom attributes are supported in QuadCommand"); CCASSERT(glProgramState->getVertexAttribsFlags() == 0, "No custom attributes are supported in QuadCommand");

View File

@ -40,7 +40,7 @@ public:
/** Initializes the command with a globalZOrder, a texture ID, a `GLProgram`, a blending function, a pointer to quads, /** Initializes the command with a globalZOrder, a texture ID, a `GLProgram`, a blending function, a pointer to quads,
* quantity of quads, and the Model View transform to be used for the quads */ * quantity of quads, and the Model View transform to be used for the quads */
void init(float globalOrder, GLuint texutreID, GLProgramState* shader, BlendFunc blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount, void init(float globalOrder, GLuint texutreID, GLProgramState* shader, const BlendFunc& blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount,
const Mat4& mv); const Mat4& mv);
void useMaterial() const; void useMaterial() const;