org.stellarium.ui.render
Class STextureGlpng

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

 class STextureGlpng
extends java.lang.Object
implements STexture

Stellarium Texture

Version:
0.8.2
Author:
Fred Simon

Field Summary
private  int loadType
           
private  int loadType2
           
private static java.lang.String texDir
           
private  int texID
           
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
STextureGlpng(boolean fullPath, java.lang.String _textureName, int _loadType)
           
STextureGlpng(boolean fullPath, java.lang.String _textureName, int _loadType, boolean mipmap)
           
STextureGlpng(java.lang.String someTextureName)
           
STextureGlpng(java.lang.String _textureName, int _loadType)
           
STextureGlpng(java.lang.String _textureName, int _loadType, boolean mipmap)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 float getAverageLuminance()
           
 int[] getDimensions()
           
 int getID()
           
 int getSize()
           
private  void initTexture(java.lang.String _textureName, int _loadType)
           
private  void initTexture(java.lang.String _textureName, int _loadType, boolean fullPath)
           
(package private)  boolean load(java.lang.String fullName)
           
(package private)  boolean load(java.lang.String fullName, boolean mipmap)
           
(package private)  void reload()
           
static void setTexDir(java.lang.String _texDir)
           
(package private)  void unload()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textureName

private java.lang.String textureName

texID

private int texID

loadType

private int loadType

loadType2

private int loadType2

texDir

private static java.lang.String texDir

wholePath

private boolean wholePath
Constructor Detail

STextureGlpng

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

STextureGlpng

public STextureGlpng(java.lang.String _textureName,
                     int _loadType)
              throws StellariumException
Throws:
StellariumException

STextureGlpng

public STextureGlpng(boolean fullPath,
                     java.lang.String _textureName,
                     int _loadType)
              throws StellariumException
Throws:
StellariumException

STextureGlpng

public STextureGlpng(boolean fullPath,
                     java.lang.String _textureName,
                     int _loadType,
                     boolean mipmap)
              throws StellariumException
Throws:
StellariumException

STextureGlpng

public STextureGlpng(java.lang.String _textureName,
                     int _loadType,
                     boolean mipmap)
              throws StellariumException
Throws:
StellariumException
Method Detail

initTexture

private void initTexture(java.lang.String _textureName,
                         int _loadType,
                         boolean fullPath)

initTexture

private void initTexture(java.lang.String _textureName,
                         int _loadType)

finalize

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

load

boolean load(java.lang.String fullName)
       throws StellariumException
Throws:
StellariumException

load

boolean load(java.lang.String fullName,
             boolean mipmap)
       throws StellariumException
Throws:
StellariumException

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

getID

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

setTexDir

public static void setTexDir(java.lang.String _texDir)