public class GLTexture extends GLResourceBase
| Constructor and Description |
|---|
GLTexture(int target,
int textureID)
Create a new texture
|
| Modifier and Type | Method and Description |
|---|---|
GLTexture |
acquire()
Signal the resource that something is holding a reference to it.
|
void |
bind(com.jogamp.opengl.GL gl)
Bind the specified GL context to a texture, automatically
increases the use count of the texture.
|
void |
dispose(com.jogamp.opengl.GL gl)
Delete the current texture in a context
|
void |
fill(com.jogamp.opengl.GL gl,
int width,
int height,
int pixelBytes,
int glFormat,
int glType,
int[] swizzle,
java.nio.ByteBuffer data) |
void |
fill(com.jogamp.opengl.GL gl,
int x,
int y,
int width,
int height,
int pixelBytes,
int glFormat,
int glType,
java.nio.ByteBuffer data) |
static GLTexture |
generate(com.jogamp.opengl.GL gl,
int target) |
int |
getFormat() |
float |
getHeight()
Get the height of the physical texture
|
int |
getTarget() |
int |
getTextureId()
Get the GL texture ID
|
int |
getType() |
float |
getWidth()
Get the width of the physical texture
|
boolean |
isDisposed()
Returns true if resource has been disposed
|
void |
setBorderColor(float[] rgba) |
void |
setFilters(TextureMapProps.TextureFilter minFilter,
TextureMapProps.TextureFilter magFilter) |
void |
setHeight(int height)
Set the height of the image
|
void |
setWidth(int width)
Set the width of the image
|
void |
setWrapping(TextureMapProps.TextureWrapping sWrapping,
TextureMapProps.TextureWrapping tWrapping) |
void |
unbind(com.jogamp.opengl.GL gl)
Unbind the texture
|
disposeInvalid, disposeUnreferenced, isValid, releaseDisposeacquireAndCount, getReferenceCount, release, releaseAndCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireAndCount, getReferenceCount, release, releaseAndCountpublic GLTexture(int target,
int textureID)
target - The GL targettextureID - The GL texture IDpublic int getTextureId()
public int getTarget()
public int getFormat()
public int getType()
public void bind(com.jogamp.opengl.GL gl)
gl - The GL context to bind topublic void unbind(com.jogamp.opengl.GL gl)
public void setFilters(TextureMapProps.TextureFilter minFilter, TextureMapProps.TextureFilter magFilter)
public void setBorderColor(float[] rgba)
public void setWrapping(TextureMapProps.TextureWrapping sWrapping, TextureMapProps.TextureWrapping tWrapping)
public void dispose(com.jogamp.opengl.GL gl)
dispose in interface GLResourcedispose in class GLResourceBasepublic boolean isDisposed()
GLResourceisDisposed in interface GLResourceisDisposed in class GLResourceBasepublic void setHeight(int height)
height - The height of the imagepublic void setWidth(int width)
width - The width of the imagepublic float getWidth()
public float getHeight()
public GLTexture acquire()
ReferenceCountedacquire in interface GLResourceacquire in interface ReferenceCountedacquire in class GLResourceBasepublic void fill(com.jogamp.opengl.GL gl,
int width,
int height,
int pixelBytes,
int glFormat,
int glType,
int[] swizzle,
java.nio.ByteBuffer data)
public void fill(com.jogamp.opengl.GL gl,
int x,
int y,
int width,
int height,
int pixelBytes,
int glFormat,
int glType,
java.nio.ByteBuffer data)
public static GLTexture generate(com.jogamp.opengl.GL gl, int target)