public class JoGLTextureManager.JoGLTexture extends AbstractTexture implements Texture
Texture
implementation.Texture.Filter, Texture.Wrap
textureDataProvider, upToDate
Constructor and Description |
---|
JoGLTextureManager.JoGLTexture()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(JoGLDrawingTools drawingTools)
Bind the texture in the OpenGl context.
|
void |
draw(JoGLDrawingTools drawingTools)
Draw the texture in XY plane.
|
void |
draw(JoGLDrawingTools drawingTools,
AnchorPosition anchor,
Vector3d position,
double rotationAngle) |
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.
|
void |
postDraw(JoGLDrawingTools drawingTools) |
void |
preDraw(JoGLDrawingTools drawingTools) |
dataUpdated, getDataProvider, getMagnificationFilter, getMinifyingFilter, getSWrappingMode, getTWrappingMode, isValid, setDataProvider, setDrawer, setMagnificationFilter, setMinifyingFilter, setSWrappingMode, setTWrappingMode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataProvider, getMagnificationFilter, getMinifyingFilter, getSWrappingMode, getTWrappingMode, isValid, setDataProvider, setDrawer, setMagnificationFilter, setMinifyingFilter, setSWrappingMode, setTWrappingMode
dataUpdated
public JoGLTextureManager.JoGLTexture()
public void bind(JoGLDrawingTools drawingTools) throws SciRendererException
drawingTools
- current drawing tools.SciRendererException
- if the texture is invalid.public void preDraw(JoGLDrawingTools drawingTools) throws SciRendererException
SciRendererException
public void draw(JoGLDrawingTools drawingTools, AnchorPosition anchor, Vector3d position, double rotationAngle) throws SciRendererException
SciRendererException
public void postDraw(JoGLDrawingTools drawingTools)
public void draw(JoGLDrawingTools drawingTools) throws SciRendererException
drawingTools
- the drawing tools.SciRendererException
- if the texture is invalid.public double getSScaleFactor()
Texture
getSScaleFactor
in interface Texture
getSScaleFactor
in class AbstractTexture
public double getTScaleFactor()
Texture
getTScaleFactor
in interface Texture
getTScaleFactor
in class AbstractTexture
public void glReload()
protected double getAnchorDeltaX(AnchorPosition anchor)
anchor
- the given anchor.protected double getAnchorDeltaY(AnchorPosition anchor)
anchor
- the given anchor.