private static EntitySprite createSprite(final Object owner) { final EntitySprite entitySprite = EntitySprite.Factory.newPooledInstance(); entitySprite.m_owner = owner; final GeometrySprite geom = ((MemoryObject.ObjectFactory<GeometrySprite>) GLGeometrySprite.Factory).newPooledInstance(); entitySprite.setGeometry(geom); geom.removeReference(); return entitySprite; }
private void addGeometry(final ImageData data) { final GeometrySprite geom = ((MemoryObject.ObjectFactory<GeometrySprite>) GLGeometrySprite.Factory).newPooledInstance(); final Pixmap pixmap = data.getPixmap(); geom.setTextureCoordinates( pixmap.getTop(), pixmap.getLeft(), pixmap.getBottom(), pixmap.getRight()); geom.setSize(pixmap.getWidth(), pixmap.getHeight()); this.m_entity3D.addTexturedGeometry(geom, pixmap.getTexture(), null); geom.removeReference(); }