mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[cpp] Fix rendererObject assignment in sequence loading code
This commit is contained in:
parent
e12b71bb1a
commit
e9aab1c94e
@ -50,7 +50,6 @@ namespace spine {
|
||||
String path = sequence->getPath(basePath, i);
|
||||
regions[i] = atlas->findRegion(path);
|
||||
if (!regions[i]) return false;
|
||||
regions[i]->rendererObject = regions[i];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -787,7 +787,6 @@ int main() {
|
||||
testcase(spineboy, "data/spineboy-pro.json", "data/spineboy-pro.skel", "data/spineboy-pma.atlas", 0.62f);
|
||||
testcase(ikDemo, "data/spineboy-pro.json", "data/spineboy-pro.skel", "data/spineboy-pma.atlas", 0.6f);
|
||||
testcase(vine, "data/vine-pro.json", "data/vine-pro.skel", "data/vine-pma.atlas", 0.5f);
|
||||
testcase(dragon, "data/dragon-ess.json", "data/dragon-ess.skel", "data/dragon-pma.atlas", 0.6f);
|
||||
testcase(owl, "data/owl-pro.json", "data/owl-pro.skel", "data/owl-pma.atlas", 0.5f);
|
||||
testcase(coin, "data/coin-pro.json", "data/coin-pro.skel", "data/coin-pma.atlas", 0.5f);
|
||||
testcase(raptor, "data/raptor-pro.json", "data/raptor-pro.skel", "data/raptor-pma.atlas", 0.5f);
|
||||
|
||||
@ -90,13 +90,13 @@ void SkeletonDrawable::draw(RenderTarget &target, RenderStates states) const {
|
||||
if (!skeletonRenderer) skeletonRenderer = new (__FILE__, __LINE__) SkeletonRenderer();
|
||||
RenderCommand *command = skeletonRenderer->render(*skeleton);
|
||||
while (command) {
|
||||
Texture *texture = (Texture *)command->texture;
|
||||
Vector2u size = texture->getSize();
|
||||
Vertex vertex;
|
||||
float *positions = command->positions;
|
||||
float *uvs = command->uvs;
|
||||
uint32_t *colors = command->colors;
|
||||
uint16_t *indices = command->indices;
|
||||
Texture *texture = (Texture *)command->texture;
|
||||
Vector2u size = texture->getSize();
|
||||
for (int i = 0, n = command->numIndices; i < n; ++i) {
|
||||
int ii = indices[i];
|
||||
int index = ii << 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user