@Override public int getWidth () { int tmp, width = 0; if (data[CubemapSide.PositiveZ.index] != null && (tmp = data[CubemapSide.PositiveZ.index].getWidth()) > width) width = tmp; if (data[CubemapSide.NegativeZ.index] != null && (tmp = data[CubemapSide.NegativeZ.index].getWidth()) > width) width = tmp; if (data[CubemapSide.PositiveY.index] != null && (tmp = data[CubemapSide.PositiveY.index].getWidth()) > width) width = tmp; if (data[CubemapSide.NegativeY.index] != null && (tmp = data[CubemapSide.NegativeY.index].getWidth()) > width) width = tmp; return width; }
@Override public int getWidth () { int tmp, width = 0; if (data[CubemapSide.PositiveZ.index] != null && (tmp = data[CubemapSide.PositiveZ.index].getWidth()) > width) width = tmp; if (data[CubemapSide.NegativeZ.index] != null && (tmp = data[CubemapSide.NegativeZ.index].getWidth()) > width) width = tmp; if (data[CubemapSide.PositiveY.index] != null && (tmp = data[CubemapSide.PositiveY.index].getWidth()) > width) width = tmp; if (data[CubemapSide.NegativeY.index] != null && (tmp = data[CubemapSide.NegativeY.index].getWidth()) > width) width = tmp; return width; }
@Override public int getWidth () { return textureDatas[0].getWidth(); }
@Override public int getWidth () { return mips[0].getWidth(); }
@Override public int getWidth () { return textureDatas[0].getWidth(); }
@Override public int getWidth () { return data.getWidth(); }
@Override public int getWidth () { return data.getWidth(); }
@Override public int getWidth () { return mips[0].getWidth(); }
@Override public void prepare () { int width = -1; int height = -1; for (TextureData data : textureDatas) { data.prepare(); if (width == -1) { width = data.getWidth(); height = data.getHeight(); continue; } if (width != data.getWidth() || height != data.getHeight()) { throw new GdxRuntimeException("Error whilst preparing TextureArray: TextureArray Textures must have equal dimensions."); } } prepared = true; }
@Override public void prepare () { int width = -1; int height = -1; for (TextureData data : textureDatas) { data.prepare(); if (width == -1) { width = data.getWidth(); height = data.getHeight(); continue; } if (width != data.getWidth() || height != data.getHeight()) { throw new GdxRuntimeException("Error whilst preparing TextureArray: TextureArray Textures must have equal dimensions."); } } prepared = true; }
@Override public int getWidth () { return textureDatas[0].getWidth(); }
@Override public int getWidth () { return mips[0].getWidth(); }
@Override public int getWidth () { int tmp, width = 0; if (data[CubemapSide.PositiveZ.index] != null && (tmp = data[CubemapSide.PositiveZ.index].getWidth()) > width) width = tmp; if (data[CubemapSide.NegativeZ.index] != null && (tmp = data[CubemapSide.NegativeZ.index].getWidth()) > width) width = tmp; if (data[CubemapSide.PositiveY.index] != null && (tmp = data[CubemapSide.PositiveY.index].getWidth()) > width) width = tmp; if (data[CubemapSide.NegativeY.index] != null && (tmp = data[CubemapSide.NegativeY.index].getWidth()) > width) width = tmp; return width; }
@Override public int getWidth () { return data.getWidth(); }
@Override public void prepare () { int width = -1; int height = -1; for (TextureData data : textureDatas) { data.prepare(); if (width == -1) { width = data.getWidth(); height = data.getHeight(); continue; } if (width != data.getWidth() || height != data.getHeight()) { throw new GdxRuntimeException("Error whilst preparing TextureArray: TextureArray Textures must have equal dimensions."); } } prepared = true; }
ImageUtil.flipImageVertically(imageBuff[i]); { TextureData textureData = AWTTextureIO.newTextureData(gl3.getGLProfile(), textureBuffIm, mipmap); gl3.glBindTexture(GL3.GL_TEXTURE_2D, objects[Objects.texture.ordinal()]); { int[] alignment = new int[1]; gl3.glGetIntegerv(GL3.GL_UNPACK_ALIGNMENT, alignment, 0); // System.out.println("alignment[0] "+alignment[0]); // System.out.println("textureData.getAlignment() "+textureData.getAlignment()); if (alignment[0] != textureData.getAlignment()) { gl3.glPixelStorei(GL3.GL_UNPACK_ALIGNMENT, textureData.getAlignment()); } { gl3.glTexImage2D(GL3.GL_TEXTURE_2D, 0, textureData.getInternalFormat(), textureData.getWidth(), textureData.getHeight(), textureData.getBorder(), textureData.getPixelFormat(), textureData.getPixelType(), textureData.getBuffer()); } if (alignment[0] != textureData.getAlignment()) { gl3.glPixelStorei(GL3.GL_UNPACK_ALIGNMENT, alignment[0]); }