public class SharedTexture extends Object implements IGLBindedResource
Modifier and Type | Field and Description |
---|---|
protected com.jogamp.opengl.util.texture.TextureCoords |
coords |
protected String |
file |
protected float |
halfHeight |
protected float |
halfWidth |
protected com.jogamp.opengl.util.texture.Texture |
texture |
protected int |
textureMagnificationFilter |
protected int |
textureMinificationFilter |
protected boolean |
useMipMap |
Modifier | Constructor and Description |
---|---|
protected |
SharedTexture() |
|
SharedTexture(String file) |
Modifier and Type | Method and Description |
---|---|
com.jogamp.opengl.util.texture.TextureCoords |
getCoords() |
String |
getFile() |
float |
getHalfHeight() |
float |
getHalfWidth() |
com.jogamp.opengl.util.texture.Texture |
getTexture(com.jogamp.opengl.GL gl) |
int |
getTextureMagnificationFilter() |
int |
getTextureMinificationFilter() |
boolean |
hasMountedOnce()
Return true if mount(...) has been called at least one time
|
boolean |
isUseMipMap() |
protected void |
load(com.jogamp.opengl.GL gl,
BufferedImage image) |
protected void |
load(com.jogamp.opengl.GL gl,
String fileName) |
void |
mount(com.jogamp.opengl.GL gl)
A GL2 context MUST be current.
|
void |
setTextureMagnificationFilter(int textureMagnificationFilter)
Will apply if set before actually loading the texture.
|
void |
setTextureMinificationFilter(int textureMinificationFilter)
Will apply if set before actually loading the texture.
|
void |
setUseMipMap(boolean useMipMap)
Will apply if set before actually loading the texture.
|
protected com.jogamp.opengl.util.texture.Texture texture
protected String file
protected com.jogamp.opengl.util.texture.TextureCoords coords
protected float halfWidth
protected float halfHeight
protected boolean useMipMap
protected int textureMagnificationFilter
protected int textureMinificationFilter
protected SharedTexture()
public SharedTexture(String file)
public com.jogamp.opengl.util.texture.Texture getTexture(com.jogamp.opengl.GL gl)
public void mount(com.jogamp.opengl.GL gl)
mount
in interface IGLBindedResource
public boolean hasMountedOnce()
IGLBindedResource
hasMountedOnce
in interface IGLBindedResource
protected void load(com.jogamp.opengl.GL gl, String fileName) throws com.jogamp.opengl.GLException, IOException
com.jogamp.opengl.GLException
IOException
protected void load(com.jogamp.opengl.GL gl, BufferedImage image)
public String getFile()
public com.jogamp.opengl.util.texture.TextureCoords getCoords()
public float getHalfWidth()
public float getHalfHeight()
public boolean isUseMipMap()
public void setUseMipMap(boolean useMipMap)
useMipMap
- public int getTextureMagnificationFilter()
public void setTextureMagnificationFilter(int textureMagnificationFilter)
textureMagnificationFilter
- public int getTextureMinificationFilter()
public void setTextureMinificationFilter(int textureMinificationFilter)
textureMinificationFilter
- Copyright © 2018. All rights reserved.