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

Method getTextureRegion2

core/src/core/java/var3d/net/center/VGame.java:1905–1928  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

1903 }
1904
1905 public TextureRegion getTextureRegion2(String name) {
1906 TextureRegion regin;
1907 if (atlas != null) {
1908 regin = atlas.findRegion(name);
1909 if (regin != null) {
1910 return regin;
1911 } else {
1912 PixmapPro pro = new PixmapPro(Gdx.files.internal(name));
1913 Texture texture = pro.getTextrue();
1914 texture.setFilter(filter, filter);
1915 regin = new TextureRegion(texture);
1916 atlas.addRegion(name, regin);
1917 return regin;
1918 }
1919 } else {
1920 atlas = new TextureAtlas();
1921 PixmapPro pro = new PixmapPro(Gdx.files.internal(name));
1922 Texture texture = pro.getTextrue();
1923 texture.setFilter(filter, filter);
1924 regin = new TextureRegion(texture);
1925 atlas.addRegion(name, regin);
1926 return regin;
1927 }
1928 }
1929
1930 public Pixmap getPixmap(String name) {
1931 if (isProtect && !isReProtect) {

Callers 1

getTextureRegionMethod · 0.95

Calls 1

getTextrueMethod · 0.95

Tested by

no test coverage detected