MCPcopy Create free account
hub / github.com/Var3D/var3dframe / render

Method render

core/src/core/java/var3d/net/center/VGame.java:460–542  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

458 }
459
460 public void render() {
461 if (isLoading) {
462 if (assets.update()) {
463 isLoading = false;
464 Array<Texture> out = new Array<Texture>();
465 assets.getAll(Texture.class, out);
466 for (Texture tex : out) {
467 tex.setFilter(filter, filter);
468 }
469 if (isProtect && !isReProtect) {
470 Array<PixmapPro> outPixmapPro = new Array<PixmapPro>();
471 assets.getAll(PixmapPro.class, outPixmapPro);
472 if (outPixmapPro.size > 0) {
473 if (atlas == null) atlas = new TextureAtlas();
474 for (PixmapPro pix : outPixmapPro) {
475 Texture texture = pix.getTextrue();
476 texture.setFilter(filter, filter);
477 atlas.addRegion(pix.getName(), new TextureRegion(texture));
478 assets.unload(pix.getName());
479 }
480 }
481 }
482 if (inpacks.size > 0) {
483 if (packer == null)
484 packer = new PixmapPacker(pageWidth, pageWidth, Format.RGBA8888, 2, true);
485 if (atlas == null) atlas = new TextureAtlas();
486 for (String path : inpacks) {
487 try {
488 Pixmap pixmap;
489 if (isProtect && !isReProtect) {
490 pixmap = assets.get(path, PixmapPro.class).getPixmap();
491 } else {
492 pixmap = assets.get(path, Pixmap.class);
493 }
494 packer.pack(path, pixmap);
495 assets.unload(path);
496 } catch (Exception e) {
497 }
498 }
499 packer.updateTextureAtlas(atlas, filter, filter, false);
500 for (Page page : packer.getPages()) {
501 page.getPixmap().dispose();
502 }
503 packer.dispose();
504 packer = null;
505 inpacks.clear();
506 }
507 if (stage != null) {
508 stage.init();
509 stageStartTime = System.currentTimeMillis();
510 }
511 }
512 if (stageLoad != null) {
513 stageLoad.act(assets.getProgress());
514 stageLoad.draw();
515 }
516 } else {
517 if (stage != null) {

Callers 2

runMethod · 0.95
getFontPixmapMethod · 0.80

Calls 15

cleanMethod · 0.95
getFontMethod · 0.95
getHeapMethod · 0.95
updateMethod · 0.80
getTextrueMethod · 0.80
endMethod · 0.80
getNameMethod · 0.45
getPixmapMethod · 0.45
getMethod · 0.45
disposeMethod · 0.45
initMethod · 0.45
actMethod · 0.45

Tested by

no test coverage detected