org.scilab.forge.scirenderer.implementation.jogl.texture
Class JoGLTextureManager

java.lang.Object
  extended by org.scilab.forge.scirenderer.implementation.jogl.texture.JoGLTextureManager
All Implemented Interfaces:
TextureManager

public class JoGLTextureManager
extends java.lang.Object
implements TextureManager

Author:
Pierre Lando

Nested Class Summary
 class JoGLTextureManager.JoGLTexture
          Inner class for Texture implementation.
 
Constructor Summary
JoGLTextureManager(JoGLCanvas canvas)
           
 
Method Summary
 void bind(JoGLDrawingTools drawingTools, Texture texture)
          Texture binder.
 Texture createTexture()
          Texture creator.
 void dispose(java.util.Collection<Texture> textures)
          Dispose the given textures.
 void dispose(Texture texture)
           
 void draw(JoGLDrawingTools drawingTools, Texture texture)
          Draw the given texture.
 void draw(JoGLDrawingTools drawingTools, Texture texture, AnchorPosition anchor, ElementsBuffer positions, double rotationAngle)
           
 void draw(JoGLDrawingTools drawingTools, Texture texture, AnchorPosition anchor, Vector3d position, double rotationAngle)
           
 void glReload()
          Called when gl context is gone.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoGLTextureManager

public JoGLTextureManager(JoGLCanvas canvas)
Method Detail

bind

public void bind(JoGLDrawingTools drawingTools,
                 Texture texture)
          throws SciRendererException
Texture binder. Bind the given texture to the given OpenGl context.

Parameters:
drawingTools - drawing tools.
texture - given texture.
Throws:
SciRendererException - if the texture can't be bind.

draw

public void draw(JoGLDrawingTools drawingTools,
                 Texture texture)
          throws SciRendererException
Draw the given texture.

Parameters:
drawingTools - used drawing tools.
texture - the texture too drawn.
Throws:
SciRendererException - if the texture is invalid.

draw

public void draw(JoGLDrawingTools drawingTools,
                 Texture texture,
                 AnchorPosition anchor,
                 ElementsBuffer positions,
                 double rotationAngle)
          throws SciRendererException
Throws:
SciRendererException

draw

public void draw(JoGLDrawingTools drawingTools,
                 Texture texture,
                 AnchorPosition anchor,
                 Vector3d position,
                 double rotationAngle)
          throws SciRendererException
Throws:
SciRendererException

glReload

public void glReload()
Called when gl context is gone.


createTexture

public Texture createTexture()
Description copied from interface: TextureManager
Texture creator.

Specified by:
createTexture in interface TextureManager
Returns:
a new Texture

dispose

public void dispose(java.util.Collection<Texture> textures)
Description copied from interface: TextureManager
Dispose the given textures.

Specified by:
dispose in interface TextureManager
Parameters:
textures - textures to dispose.

dispose

public void dispose(Texture texture)
Specified by:
dispose in interface TextureManager