| Constructor and Description |
|---|
TextureFloat(int floatPrecisionInBits,
int numChannels,
int width,
int height,
boolean hasAlpha,
int numTextures,
int numLevels) |
TextureFloat(int floatPrecisionInBits,
int numChannels,
int width,
int height,
boolean hasAlpha,
int numTextures,
int numLevels,
byte[] raw) |
| Modifier and Type | Method and Description |
|---|---|
TextureFloat |
clone() |
static void |
copyUnsafe(TextureFloat dst,
int dstSubTexture,
int dstLevel,
TextureFloat src,
int srcSubTexture,
int srcLevel)
Copy src to destination.
|
static void |
divideByTwoUnsafe(TextureFloat dst,
int dstSubTexture,
int dstLevel,
TextureFloat src,
int srcSubTexture,
int srcLevel)
Resize a texture by 2.
|
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 RGB value of the pixel (col, row) color.
|
float |
getChannelF(int texture,
int level,
int channel,
int col,
int line) |
int |
getColor(int texture,
int level,
int x,
int y,
int z)
Get the color of the pixel at (col, row).
|
int |
getDataType() |
int |
getDepth() |
int |
getFloatPrecisionInBits() |
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) |
TextureID.RgbMode |
getRgbMode(int threshold) |
int |
getSizeInBytes(int level) |
int |
getWidth() |
boolean |
hasAlpha() |
static void |
resizeUnsafe(TextureFloat dst,
int dstSubTexture,
int dstLevel,
TextureFloat src,
int srcSubTexture,
int srcLevel)
Used internally for optimization of
TextureUtils.resize(ITexture, int, int, int) |
void |
setChannel(int texture,
int level,
int channel,
int col,
int line,
float value) |
void |
setChannel(int texture,
int level,
int channel,
int x,
int y,
int z,
byte value)
Set the rgba color of the pixel (col, row).
|
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)
|
static int |
size(int floatPrecisionInBits,
int numChannels,
int width,
int height,
int numTextures,
int numLevels) |
public TextureFloat(int floatPrecisionInBits,
int numChannels,
int width,
int height,
boolean hasAlpha,
int numTextures,
int numLevels)
public TextureFloat(int floatPrecisionInBits,
int numChannels,
int width,
int height,
boolean hasAlpha,
int numTextures,
int numLevels,
byte[] raw)
floatPrecisionInBits - floating point precision, 16 (half-float) or 32 (float)numChannels - number of channelswidth - width of the textureheight - height of the texturenumTextures - raw - public static final int size(int floatPrecisionInBits,
int numChannels,
int width,
int height,
int numTextures,
int numLevels)
public final TextureFloat clone()
public void setChannel(int texture,
int level,
int channel,
int x,
int y,
int z,
byte value)
setChannel in interface ITexturevalue - red channel of the pixel's colorx - col coordinates of the pixel (0 is the first left col)y - row coordinates of the pixel (o is the first bottom row)texture - 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()[z - depth coordinates of the pixel. Front is 0, Back is ITexture.getDepth() - 1.public byte getChannel(int texture,
int level,
int channel,
int x,
int y,
int z)
getChannel in interface ITexturex - col coordinates of the pixel (0 is the first left col)y - row coordinates of the pixel (o is the first bottom row)texture - 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()[z - depth coordinates of the pixel. Front is 0, Back is ITexture.getDepth() - 1.public int getColor(int texture,
int level,
int x,
int y,
int z)
getColor in interface ITexturex - col coordinates of the pixel (0 is the first left col)y - row coordinates of the pixel (o is the first bottom row)texture - index of the texture in the range [0;ITexture.getNumTextures()[ (usually 0)z - depth coordinates of the pixel. Front is 0, Back is ITexture.getDepth() - 1.public 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 flip(boolean flipWidth,
boolean flipHeight)
public int getDataType()
getDataType in interface ITextureITexture.getRaw()public 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 int getInternalFormat(IGL gl, int channelBits)
getInternalFormat in interface ITexturechannelBits - number of channel bits.
public float getChannelF(int texture,
int level,
int channel,
int col,
int line)
public final void setChannel(int texture,
int level,
int channel,
int col,
int line,
float value)
public final int getSizeInBytes(int level)
getSizeInBytes in interface ITextureITexture.getRaw(int, int, ByteBuffer)public final int getOffsetInBytes(int texture_,
int level_)
getOffsetInBytes 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 final int getWidth()
public final int getHeight()
public final int getDepth()
public final int getNumChannels()
getNumChannels in interface ITexturepublic final int getNumLevels()
ITexturegetNumLevels in interface ITexturepublic final int getNumTextures()
ITexturegetNumTextures in interface ITexturepublic final boolean hasAlpha()
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 int getFloatPrecisionInBits()
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 flagpublic static final void copyUnsafe(TextureFloat dst, int dstSubTexture, int dstLevel, TextureFloat src, int srcSubTexture, int srcLevel)
TextureUtils.copy(ITexture) functionspublic static final void resizeUnsafe(TextureFloat dst, int dstSubTexture, int dstLevel, TextureFloat src, int srcSubTexture, int srcLevel)
TextureUtils.resize(ITexture, int, int, int)public static final void divideByTwoUnsafe(TextureFloat dst, int dstSubTexture, int dstLevel, TextureFloat src, int srcSubTexture, int srcLevel)
TextureUtils.resize(ITexture, int, int, int)Bonzai 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