Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cubemaps to the management, fixes #5047 #6323

Merged
merged 1 commit into from Dec 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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