org.jzy3d.plot3d.rendering.textures
Class BufferedImageTexture

java.lang.Object
  extended by org.jzy3d.plot3d.rendering.textures.SharedTexture
      extended by org.jzy3d.plot3d.rendering.textures.BufferedImageTexture
All Implemented Interfaces:
IGLBindedResource

public class BufferedImageTexture
extends SharedTexture


Field Summary
protected  com.jogamp.opengl.util.texture.TextureCoords coords
           
protected  float halfHeight
           
protected  float halfWidth
           
protected  BufferedImage image
           
protected  com.jogamp.opengl.util.texture.Texture texture
           
 
Fields inherited from class org.jzy3d.plot3d.rendering.textures.SharedTexture
file
 
Constructor Summary
BufferedImageTexture(BufferedImage image)
           
 
Method Summary
 com.jogamp.opengl.util.texture.TextureCoords getCoords()
           
 String getFile()
          returns null
 float getHalfHeight()
           
 float getHalfWidth()
           
 com.jogamp.opengl.util.texture.Texture getTexture(javax.media.opengl.GL2 gl)
           
protected  void load(javax.media.opengl.GL2 gl, BufferedImage image)
           
 void mount(javax.media.opengl.GL2 gl)
          A GL2 context MUST be current.
 
Methods inherited from class org.jzy3d.plot3d.rendering.textures.SharedTexture
hasMountedOnce, load
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

texture

protected com.jogamp.opengl.util.texture.Texture texture

image

protected BufferedImage image

coords

protected com.jogamp.opengl.util.texture.TextureCoords coords

halfWidth

protected float halfWidth

halfHeight

protected float halfHeight
Constructor Detail

BufferedImageTexture

public BufferedImageTexture(BufferedImage image)
Method Detail

getTexture

public com.jogamp.opengl.util.texture.Texture getTexture(javax.media.opengl.GL2 gl)
Overrides:
getTexture in class SharedTexture

mount

public void mount(javax.media.opengl.GL2 gl)
A GL2 context MUST be current.

Specified by:
mount in interface IGLBindedResource
Overrides:
mount in class SharedTexture

load

protected void load(javax.media.opengl.GL2 gl,
                    BufferedImage image)
             throws javax.media.opengl.GLException,
                    IOException
Throws:
javax.media.opengl.GLException
IOException

getFile

public String getFile()
returns null

Overrides:
getFile in class SharedTexture

getCoords

public com.jogamp.opengl.util.texture.TextureCoords getCoords()
Overrides:
getCoords in class SharedTexture

getHalfWidth

public float getHalfWidth()
Overrides:
getHalfWidth in class SharedTexture

getHalfHeight

public float getHalfHeight()
Overrides:
getHalfHeight in class SharedTexture