public interface ITexture
extends java.lang.Cloneable
| Modifier and Type | Method and Description |
|---|---|
ITexture |
clone() |
void |
flip(boolean flipWidth,
boolean flipHeight) |
TextureID.AlphaMode |
getAlphaMode(int treshold) |
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() |
int |
getDepth() |
int |
getFormat() |
int |
getHeight() |
int |
getInternalFormat(IGL gl,
int channelBits) |
int |
getLevelDepth(int depth) |
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) |
TextureID.RgbMode |
getRgbMode(int treshold) |
int |
getSizeInBytes(int level) |
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 rgbMode,
TextureID.AlphaMode alphaMode) |
void |
setColor(int texture,
int level,
int x,
int y,
int z,
int color)
Set the color of the texel at (col, line)
|
ITexture clone()
int getWidth()
int getHeight()
int getDepth()
int getNumChannels()
boolean hasAlpha()
int getNumLevels()
int getNumTextures()
int getLevelHeight(int level)
int getLevelWidth(int level)
int getLevelDepth(int depth)
void flip(boolean flipWidth,
boolean flipHeight)
flipWidth - true to flip texture horizontallyflipHeight - true to flip texture verticallyjava.lang.UnsupportedOperationException - if not supported (compressed texture can't be flipped horizontally)int getSizeInBytes(int level)
getRaw(int, int, ByteBuffer)int getOffsetInBytes(int texture,
int level)
void getRaw(int texture,
int level,
java.nio.ByteBuffer dst)
texture - sub texture index to retrieve datadst - ByteBuffer with at least getSizeInBytes(int) remaining bytes. Position is not modifiedvoid getRaw(int texture,
int level,
byte[] dst)
texture - sub texture index to retrieve datadst - destination array with at least getSizeInBytes(int) remaining bytes. Position is not modifiedbyte[] getRaw()
int getInternalFormat(IGL gl, int channelBits)
gl - channelBits - number of channel bits.
int getFormat()
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)int getDataType()
getRaw()int getColor(int texture,
int level,
int x,
int y,
int z)
texture - index of the texture in the range [0;getNumTextures()[ (usually 0)x - column coordinates of the pixel. Left is 0, right is getWidth() - 1.y - line coordinates of the pixel. Bottom is 0, top is getHeight() - 1.z - depth coordinates of the pixel. Front is 0, Back is getDepth() - 1.void setColor(int texture,
int level,
int x,
int y,
int z,
int color)
texture - index of the texture in the range [0;getNumTextures()[ (usually 0)x - column coordinates of the pixel. Left is 0, right is getWidth() - 1.y - line coordinates of the pixel. Bottom is 0, top is getHeight() - 1.z - depth coordinates of the pixel. Front is 0, Back is getDepth() - 1.void setChannel(int texture,
int level,
int channel,
int x,
int y,
int z,
byte value)
texture - index of the texture in the range [0;getNumTextures()[ (usually 0)channel - index of the channel to set, in the range [0; getNumChannels()[x - column coordinates of the pixel. Left is 0, right is getWidth() - 1.y - line coordinates of the pixel. Bottom is 0, top is getHeight() - 1.z - depth coordinates of the pixel. Front is 0, Back is getDepth() - 1.byte getChannel(int texture,
int level,
int channel,
int x,
int y,
int z)
texture - index of the texture in the range [0;getNumTextures()[ (usually 0)channel - index of the channel to get, in the range [0; getNumChannels()[x - column coordinates of the pixel. Left is 0, right is getWidth() - 1.y - line coordinates of the pixel. Bottom is 0, top is getHeight() - 1.z - depth coordinates of the pixel. Front is 0, Back is getDepth() - 1.TextureID.RgbMode getRgbMode(int treshold)
treshold - TextureID.AlphaMode getAlphaMode(int treshold)
treshold - void setChannelMode(TextureID.RgbMode rgbMode, TextureID.AlphaMode alphaMode)
rgbMode - rgb channel mode flagalphaMode - 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