소스 검색

Throw exception if a mesh can't be rendered.

NathanSweet 11 년 전
부모
커밋
89c4a57809
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java

+ 2 - 0
spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java

@@ -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;