Skip to content

Commit

Permalink
add cubemaps to the management, fixes #5047 (#6323)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsx-dev committed Dec 27, 2020
1 parent f4d5f1d commit 4f57d2f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions gdx/src/com/badlogic/gdx/graphics/Cubemap.java
Expand Up @@ -95,6 +95,7 @@ public Cubemap (CubemapData data) {
super(GL20.GL_TEXTURE_CUBE_MAP);
this.data = data;
load(data);
if (data.isManaged()) addManagedCubemap(Gdx.app, this);
}

/** Construct a Cubemap with the specified texture files for the sides, does not generate mipmaps. */
Expand Down Expand Up @@ -137,13 +138,7 @@ public Cubemap (int width, int height, int depth, Format format) {
/** Construct a Cubemap with the specified {@link TextureData}'s for the sides */
public Cubemap (TextureData positiveX, TextureData negativeX, TextureData positiveY, TextureData negativeY,
TextureData positiveZ, TextureData negativeZ) {
super(GL20.GL_TEXTURE_CUBE_MAP);
minFilter = TextureFilter.Nearest;
magFilter = TextureFilter.Nearest;
uWrap = TextureWrap.ClampToEdge;
vWrap = TextureWrap.ClampToEdge;
data = new FacedCubemapData(positiveX, negativeX, positiveY, negativeY, positiveZ, negativeZ);
load(data);
this(new FacedCubemapData(positiveX, negativeX, positiveY, negativeY, positiveZ, negativeZ));
}

/** Sets the sides of this cubemap to the specified {@link CubemapData}. */
Expand Down

0 comments on commit 4f57d2f

Please sign in to comment.