org.stellarium.ui.render
Class STextureJogl

java.lang.Object
  extended by org.stellarium.ui.render.STextureJogl
All Implemented Interfaces:
STexture

 class STextureJogl
extends java.lang.Object
implements STexture

Stellarium Texture

Version:
0.8.2
Author:
Fred Simon

Field Summary
private  int loadType
           
private  int loadType2
           
private  boolean mipmap
           
private  com.sun.opengl.util.texture.Texture texture
           
private  java.lang.String textureName
           
private  boolean wholePath
           
 
Fields inherited from interface org.stellarium.ui.render.STexture
TEX_LOAD_TYPE_PNG_ALPHA, TEX_LOAD_TYPE_PNG_BLEND1, TEX_LOAD_TYPE_PNG_BLEND3, TEX_LOAD_TYPE_PNG_BLEND4, TEX_LOAD_TYPE_PNG_BLEND8, TEX_LOAD_TYPE_PNG_REPEAT, TEX_LOAD_TYPE_PNG_SOLID, TEX_LOAD_TYPE_PNG_SOLID_REPEAT
 
Constructor Summary
STextureJogl(boolean fullPath, java.lang.String textureName, int loadType)
           
STextureJogl(boolean fullPath, java.lang.String textureName, int loadType, boolean mipmap)
           
STextureJogl(java.lang.String someTextureName)
           
STextureJogl(java.lang.String textureName, int loadType)
           
STextureJogl(java.lang.String textureName, int loadType, boolean mipmap)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 float getAverageLuminance()
           
 int[] getDimensions()
           
 int getID()
           
 int getSize()
           
 com.sun.opengl.util.texture.Texture getTexture()
           
private  void initLoadType(int loadType)
           
private  void load()
           
private  boolean loadFromFile()
           
private  boolean loadFromLocator()
           
(package private)  void reload()
           
(package private)  void unload()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wholePath

private final boolean wholePath

textureName

private final java.lang.String textureName

mipmap

private final boolean mipmap

texture

private com.sun.opengl.util.texture.Texture texture

loadType

private int loadType

loadType2

private int loadType2
Constructor Detail

STextureJogl

public STextureJogl(java.lang.String someTextureName)
             throws StellariumException
Throws:
StellariumException

STextureJogl

public STextureJogl(java.lang.String textureName,
                    int loadType)
             throws StellariumException
Throws:
StellariumException

STextureJogl

public STextureJogl(boolean fullPath,
                    java.lang.String textureName,
                    int loadType)
             throws StellariumException
Throws:
StellariumException

STextureJogl

public STextureJogl(java.lang.String textureName,
                    int loadType,
                    boolean mipmap)
             throws StellariumException
Throws:
StellariumException

STextureJogl

public STextureJogl(boolean fullPath,
                    java.lang.String textureName,
                    int loadType,
                    boolean mipmap)
             throws StellariumException
Throws:
StellariumException
Method Detail

initLoadType

private void initLoadType(int loadType)

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

load

private void load()

loadFromFile

private boolean loadFromFile()

loadFromLocator

private boolean loadFromLocator()

unload

void unload()

reload

void reload()
      throws StellariumException
Throws:
StellariumException

getSize

public int getSize()
Specified by:
getSize in interface STexture
Returns:
the texture size in pixels

getAverageLuminance

public float getAverageLuminance()
Specified by:
getAverageLuminance in interface STexture
Returns:
the average texture luminance : 0 is black, 1 is white

getDimensions

public int[] getDimensions()
Specified by:
getDimensions in interface STexture

close

public void close()
Specified by:
close in interface STexture

getTexture

public com.sun.opengl.util.texture.Texture getTexture()

getID

public int getID()
Specified by:
getID in interface STexture
Returns:
the pointer ID used in OpenGL