org.jzy3d.plot3d.rendering.textures
Class SharedTexture

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

public class SharedTexture
extends Object
implements IGLBindedResource


Field Summary
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
           
 
Constructor Summary
protected SharedTexture()
           
  SharedTexture(String file)
           
 
Method Summary
 com.jogamp.opengl.util.texture.TextureCoords getCoords()
           
 String getFile()
           
 float getHalfHeight()
           
 float getHalfWidth()
           
 com.jogamp.opengl.util.texture.Texture getTexture(javax.media.opengl.GL2 gl)
           
 boolean hasMountedOnce()
           
protected  void load(javax.media.opengl.GL2 gl, String fileName)
           
 void mount(javax.media.opengl.GL2 gl)
          A GL2 context MUST be current.
 
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

file

protected String file

coords

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

halfWidth

protected float halfWidth

halfHeight

protected float halfHeight
Constructor Detail

SharedTexture

protected SharedTexture()

SharedTexture

public SharedTexture(String file)
Method Detail

getTexture

public com.jogamp.opengl.util.texture.Texture getTexture(javax.media.opengl.GL2 gl)

mount

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

Specified by:
mount in interface IGLBindedResource

hasMountedOnce

public boolean hasMountedOnce()
Specified by:
hasMountedOnce in interface IGLBindedResource

load

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

getFile

public String getFile()

getCoords

public com.jogamp.opengl.util.texture.TextureCoords getCoords()

getHalfWidth

public float getHalfWidth()

getHalfHeight

public float getHalfHeight()