public class JoGLTextureManager.JoGLTexture extends AbstractTexture implements Texture
Texture implementation.Texture.Filter, Texture.WraptextureDataProvider, upToDate| Constructor and Description |
|---|
JoGLTexture()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(JoGLDrawingTools drawingTools)
Bind the texture in the OpenGl context.
|
void |
dispose() |
void |
draw(JoGLDrawingTools drawingTools) |
void |
draw(JoGLDrawingTools drawingTools,
AnchorPosition anchor,
Vector3d position,
double rotationAngle,
float[] color) |
void |
draw(JoGLDrawingTools drawingTools,
float[] color)
Draw the texture in XY plane.
|
protected double |
getAnchorDeltaX(AnchorPosition anchor)
Return the deltaX to apply to the sprite in regards to the given anchor.
|
protected double |
getAnchorDeltaY(AnchorPosition anchor)
Return the deltaY to apply to the sprite in regards to the given anchor.
|
double |
getSScaleFactor()
2D-Texture coordinates must be modified according to the real texture dimension which can differ from
the textureSize (with certains GC, a texture must have a size which is a power-of-two).
|
double |
getTScaleFactor()
2D-Texture coordinates must be modified according to the real texture dimension which can differ from
the textureSize (with certains GC, a texture must have a size which is a power-of-two).
|
void |
glReload()
Called when gl context is gone.
|
boolean |
isRowMajorOrder() |
void |
postDraw(JoGLDrawingTools drawingTools) |
boolean |
preDraw(JoGLDrawingTools drawingTools,
float[] auxcolor) |
dataUpdated, getDataProvider, getMagnificationFilter, getMinifyingFilter, getSWrappingMode, getTWrappingMode, isValid, setDataProvider, setDrawer, setMagnificationFilter, setMinifyingFilter, setSWrappingMode, setTWrappingModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDataProvider, getMagnificationFilter, getMinifyingFilter, getSWrappingMode, getTWrappingMode, isValid, setDataProvider, setDrawer, setMagnificationFilter, setMinifyingFilter, setSWrappingMode, setTWrappingModedataUpdatedpublic final boolean isRowMajorOrder()
public void bind(JoGLDrawingTools drawingTools) throws SciRendererException
drawingTools - current drawing tools.SciRendererException - if the texture is invalid.public void dispose()
public boolean preDraw(JoGLDrawingTools drawingTools, float[] auxcolor) throws SciRendererException
SciRendererExceptionpublic void draw(JoGLDrawingTools drawingTools, AnchorPosition anchor, Vector3d position, double rotationAngle, float[] color) throws SciRendererException
SciRendererExceptionpublic void postDraw(JoGLDrawingTools drawingTools)
public void draw(JoGLDrawingTools drawingTools) throws SciRendererException
SciRendererExceptionpublic void draw(JoGLDrawingTools drawingTools, float[] color) throws SciRendererException
drawingTools - the drawing tools.SciRendererException - if the texture is invalid.public double getSScaleFactor()
TexturegetSScaleFactor in interface TexturegetSScaleFactor in class AbstractTexturepublic double getTScaleFactor()
TexturegetTScaleFactor in interface TexturegetTScaleFactor in class AbstractTexturepublic void glReload()
protected double getAnchorDeltaX(AnchorPosition anchor)
anchor - the given anchor.protected double getAnchorDeltaY(AnchorPosition anchor)
anchor - the given anchor.