diff --git a/cocos/2d/renderer/CCRenderCommand.h b/cocos/2d/renderer/CCRenderCommand.h index 7b6ec54e0c..887d717d7e 100644 --- a/cocos/2d/renderer/CCRenderCommand.h +++ b/cocos/2d/renderer/CCRenderCommand.h @@ -50,9 +50,10 @@ public: virtual int64_t generateID() = 0; /** Get Render Command Id */ - virtual inline int64_t getID() { return _id; } - - virtual inline Type getType() { return _type; } + inline int64_t getID() { return _id; } + + /** Returns the Command type */ + inline Type getType() { return _type; } protected: RenderCommand(); diff --git a/cocos/2d/renderer/CCRenderer.cpp b/cocos/2d/renderer/CCRenderer.cpp index 4454f1480f..15da8cfbdd 100644 --- a/cocos/2d/renderer/CCRenderer.cpp +++ b/cocos/2d/renderer/CCRenderer.cpp @@ -333,41 +333,17 @@ void Renderer::convertToWorldCoordiantes(V3F_C4B_T2F_Quad* quads, ssize_t quanti for(ssize_t i=0; ibl.vertices.x; - vec1.y = q->bl.vertices.y; - vec1.z = q->bl.vertices.z; - kmVec3Transform(&out1, &vec1, &modelView); - q->bl.vertices.x = out1.x; - q->bl.vertices.y = out1.y; - q->bl.vertices.z = out1.z; + kmVec3 *vec1 = (kmVec3*)&q->bl.vertices; + kmVec3Transform(vec1, vec1, &modelView); - kmVec3 vec2, out2; - vec2.x = q->br.vertices.x; - vec2.y = q->br.vertices.y; - vec2.z = q->br.vertices.z; - kmVec3Transform(&out2, &vec2, &modelView); - q->br.vertices.x = out2.x; - q->br.vertices.y = out2.y; - q->br.vertices.z = out2.z; + kmVec3 *vec2 = (kmVec3*)&q->br.vertices; + kmVec3Transform(vec2, vec2, &modelView); - kmVec3 vec3, out3; - vec3.x = q->tr.vertices.x; - vec3.y = q->tr.vertices.y; - vec3.z = q->tr.vertices.z; - kmVec3Transform(&out3, &vec3, &modelView); - q->tr.vertices.x = out3.x; - q->tr.vertices.y = out3.y; - q->tr.vertices.z = out3.z; + kmVec3 *vec3 = (kmVec3*)&q->tr.vertices; + kmVec3Transform(vec3, vec3, &modelView); - kmVec3 vec4, out4; - vec4.x = q->tl.vertices.x; - vec4.y = q->tl.vertices.y; - vec4.z = q->tl.vertices.z; - kmVec3Transform(&out4, &vec4, &modelView); - q->tl.vertices.x = out4.x; - q->tl.vertices.y = out4.y; - q->tl.vertices.z = out4.z; + kmVec3 *vec4 = (kmVec3*)&q->tl.vertices; + kmVec3Transform(vec4, vec4, &modelView); } }