public final class TextureDXT5
extends java.lang.Object
| Constructor and Description |
|---|
TextureDXT5(int width,
int height,
int numTextures,
int numLevels,
byte[] data,
Dds.DdsSwizzling swizzling) |
| Modifier and Type | Method and Description |
|---|---|
TextureDXT5 |
clone() |
void |
flip(boolean flipWidth,
boolean flipHeight) |
TextureID.AlphaMode |
getAlphaMode(int threshold) |
byte |
getChannel(int texture,
int level,
int channel,
int x,
int y,
int z)
Get the color channel / component of the texel at (col, line)
|
int |
getColor(int texture,
int level,
int x,
int y,
int z)
Get the color of the texel at (col, line)
|
int |
getDataType() |
Dds.DdsFormat |
getDdsFormat() |
Dds.DdsSwizzling |
getDdsSwizzling() |
int |
getDepth() |
int |
getFormat() |
int |
getHeight() |
int |
getInternalFormat(IGL gl,
int channelBits) |
int |
getLevelDepth(int level) |
int |
getLevelHeight(int level) |
int |
getLevelWidth(int level) |
int |
getNumChannels() |
int |
getNumLevels()
Number of mipmap levels
|
int |
getNumTextures()
All internal texture have the same format, size, number of channels, ...
|
int |
getOffsetInBytes(int texture,
int level) |
byte[] |
getRaw() |
void |
getRaw(int texture,
int level,
byte[] dst) |
void |
getRaw(int texture,
int level,
java.nio.ByteBuffer dst)
Buffer data for the mipmap level.
|
TextureID.RgbMode |
getRgbMode(int threshold) |
int |
getSizeInBytes(int level) |
Dds.DdsSwizzling |
getSwizzling() |
int |
getWidth() |
boolean |
hasAlpha() |
void |
setChannel(int texture,
int level,
int channel,
int x,
int y,
int z,
byte value)
Set the color channel / component of the texel at (col, line)
|
void |
setChannelMode(TextureID.RgbMode rgbChannelMode,
TextureID.AlphaMode alphaChannelMode) |
void |
setColor(int texture,
int level,
int x,
int y,
int z,
int color)
Set the color of the texel at (col, line)
|
void |
uncompress(ITexture dst,
int dstSubTexture,
int dstLevel,
int srcSubTexture,
int srcLevel) |
public TextureDXT5(int width,
int height,
int numTextures,
int numLevels,
byte[] data,
Dds.DdsSwizzling swizzling)
public final TextureDXT5 clone()
public final int getColor(int texture,
int level,
int x,
int y,
int z)
ITexturegetColor in interface ITexturetexture - index of the texture in the range [0;ITexture.getNumTextures()[ (usually 0)x - column coordinates of the pixel. Left is 0, right is ITexture.getWidth() - 1.y - line coordinates of the pixel. Bottom is 0, top is ITexture.getHeight() - 1.z - depth coordinates of the pixel. Front is 0, Back is ITexture.getDepth() - 1.public final int getInternalFormat(IGL gl, int channelBits)
channelBits - number of channel bits.
public final boolean hasAlpha()
public final Dds.DdsSwizzling getSwizzling()
public final Dds.DdsFormat getDdsFormat()
Dds.DdsFormatpublic final Dds.DdsSwizzling getDdsSwizzling()
Dds.DdsSwizzlingpublic final int getNumTextures()
ITexturegetNumTextures in interface ITexturepublic final int getNumChannels()
getNumChannels in interface ITexturepublic final int getWidth()
public final int getHeight()
public final int getDepth()
public final int getNumLevels()
getNumLevels in interface ITexturepublic final int getOffsetInBytes(int texture,
int level)
getOffsetInBytes in interface ITexturepublic final int getSizeInBytes(int level)
getSizeInBytes in interface ITextureITexture.getRaw(int, int, ByteBuffer)public final int getLevelWidth(int level)
getLevelWidth in interface ITexturepublic final int getLevelHeight(int level)
getLevelHeight in interface ITexturepublic final int getLevelDepth(int level)
getLevelDepth in interface ITexturepublic final void getRaw(int texture,
int level,
java.nio.ByteBuffer dst)
getRaw in interface ITexturetexture - sub texture index to retrieve datadst - ByteBuffer with at least ITexture.getSizeInBytes(int) remaining bytes. Position is not modifiedpublic final void getRaw(int texture,
int level,
byte[] dst)
getRaw in interface ITexturetexture - sub texture index to retrieve datadst - destination array with at least ITexture.getSizeInBytes(int) remaining bytes. Position is not modifiedpublic void flip(boolean flipWidth,
boolean flipHeight)
public final void uncompress(ITexture dst, int dstSubTexture, int dstLevel, int srcSubTexture, int srcLevel)
uncompress in interface ITextureCompressedpublic final int getDataType()
getDataType in interface ITextureITexture.getRaw()public final byte getChannel(int texture,
int level,
int channel,
int x,
int y,
int z)
ITexturegetChannel in interface ITexturetexture - index of the texture in the range [0;ITexture.getNumTextures()[ (usually 0)channel - index of the channel to get, in the range [0; ITexture.getNumChannels()[x - column coordinates of the pixel. Left is 0, right is ITexture.getWidth() - 1.y - line coordinates of the pixel. Bottom is 0, top is ITexture.getHeight() - 1.z - depth coordinates of the pixel. Front is 0, Back is ITexture.getDepth() - 1.public final int getFormat()
getFormat in interface ITextureITexture.getRaw().IGL.glTexImage2D(int, int, int, int, int, int, int, int, java.nio.ByteBuffer) or IGL.glCompressedTexImage2D(int, int, int, int, int, int, int, java.nio.ByteBuffer)public final void setColor(int texture,
int level,
int x,
int y,
int z,
int color)
ITexturesetColor in interface ITexturetexture - index of the texture in the range [0;ITexture.getNumTextures()[ (usually 0)x - column coordinates of the pixel. Left is 0, right is ITexture.getWidth() - 1.y - line coordinates of the pixel. Bottom is 0, top is ITexture.getHeight() - 1.z - depth coordinates of the pixel. Front is 0, Back is ITexture.getDepth() - 1.public final void setChannel(int texture,
int level,
int channel,
int x,
int y,
int z,
byte value)
ITexturesetChannel in interface ITexturetexture - index of the texture in the range [0;ITexture.getNumTextures()[ (usually 0)channel - index of the channel to set, in the range [0; ITexture.getNumChannels()[x - column coordinates of the pixel. Left is 0, right is ITexture.getWidth() - 1.y - line coordinates of the pixel. Bottom is 0, top is ITexture.getHeight() - 1.z - depth coordinates of the pixel. Front is 0, Back is ITexture.getDepth() - 1.public final TextureID.RgbMode getRgbMode(int threshold)
getRgbMode in interface ITexturepublic final TextureID.AlphaMode getAlphaMode(int threshold)
getAlphaMode in interface ITexturepublic final void setChannelMode(TextureID.RgbMode rgbChannelMode, TextureID.AlphaMode alphaChannelMode)
setChannelMode in interface ITexturergbChannelMode - rgb channel mode flagalphaChannelMode - alpha channel mode flagBonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com