mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Throw exception if a mesh can't be rendered.
This commit is contained in:
parent
d6c49df3ec
commit
89c4a57809
@ -143,6 +143,8 @@ public class SkeletonRenderer {
|
||||
batch.setBlendFunction(srcFunc, GL20.GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
batch.draw(regionAttachment.getRegion().getTexture(), vertices, 0, 20);
|
||||
} else if (attachment instanceof MeshAttachment || attachment instanceof SkinnedMeshAttachment) {
|
||||
throw new RuntimeException("PolygonSpriteBatch is required to render meshes.");
|
||||
} else if (attachment instanceof SkeletonAttachment) {
|
||||
Skeleton attachmentSkeleton = ((SkeletonAttachment)attachment).getSkeleton();
|
||||
if (attachmentSkeleton == null) continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user