mirror of https://github.com/axmolengine/axmol.git
Support ETC1 Alpha Channel in the Spine Library (#17692)
* Update SkeletonBatch.cpp * Update SkeletonBatch.h * Update SkeletonRenderer.cpp
This commit is contained in:
parent
77f2f82b7a
commit
e45cb88ead
|
@ -77,7 +77,7 @@ namespace spine {
|
|||
_command = _firstCommand;
|
||||
}
|
||||
|
||||
void SkeletonBatch::addCommand (cocos2d::Renderer* renderer, float globalZOrder, GLuint textureID, GLProgramState* glProgramState,
|
||||
void SkeletonBatch::addCommand (cocos2d::Renderer* renderer, float globalZOrder, Texture2D* texture, GLProgramState* glProgramState,
|
||||
BlendFunc blendFunc, const TrianglesCommand::Triangles& triangles, const Mat4& transform, uint32_t transformFlags
|
||||
) {
|
||||
if (_command->triangles->verts) {
|
||||
|
@ -92,7 +92,7 @@ namespace spine {
|
|||
_command->triangles->indexCount = triangles.indexCount;
|
||||
_command->triangles->indices = triangles.indices;
|
||||
|
||||
_command->trianglesCommand->init(globalZOrder, textureID, glProgramState, blendFunc, *_command->triangles, transform);
|
||||
_command->trianglesCommand->init(globalZOrder, texture, glProgramState, blendFunc, *_command->triangles, transform, transformFlags);
|
||||
renderer->addCommand(_command->trianglesCommand);
|
||||
|
||||
if (!_command->next) _command->next = new Command();
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace spine {
|
|||
|
||||
void update (float delta);
|
||||
|
||||
void addCommand (cocos2d::Renderer* renderer, float globalOrder, GLuint textureID, cocos2d::GLProgramState* glProgramState,
|
||||
void addCommand (cocos2d::Renderer* renderer, float globalOrder, cocos2d::Texture2D* texture, cocos2d::GLProgramState* glProgramState,
|
||||
cocos2d::BlendFunc blendType, const cocos2d::TrianglesCommand:: Triangles& triangles, const cocos2d::Mat4& mv, uint32_t flags);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -252,7 +252,7 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
|
|||
blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA;
|
||||
}
|
||||
|
||||
batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture->getName(), _glProgramState, blendFunc,
|
||||
batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, _glProgramState, blendFunc,
|
||||
*attachmentVertices->_triangles, transform, transformFlags);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue