com.partnersoft.gui.opengl
Class OpenglTextureHandle

java.lang.Object
  extended by com.partnersoft.gui.opengl.OpenglTextureHandle

public class OpenglTextureHandle
extends java.lang.Object

Indirection wrapper for Texture objects registered with an OpenglControl. Deals with reloading and other issues.

Copyright 2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
OpenglTextureHandle(OpenglControl control, java.lang.String name, com.sun.opengl.util.texture.Texture texture)
          This method should only be called from OpenglControl since it needs to track the instances.
 
Method Summary
 void dispose()
           
 OpenglControl getControl()
          Returns the control this textureHandle is registered with.
 java.lang.String getName()
          Returns the unique name for the textureHandle.
 com.sun.opengl.util.texture.Texture getTexture()
          Returns the referenced Texture object.
 boolean isOpaque()
           
 boolean isValid()
          Returns true if this textureHandle is valid (has not been disposed of).
 void setOpaque(boolean opaque)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpenglTextureHandle

public OpenglTextureHandle(OpenglControl control,
                           java.lang.String name,
                           com.sun.opengl.util.texture.Texture texture)
This method should only be called from OpenglControl since it needs to track the instances.

Method Detail

dispose

public void dispose()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isValid

public boolean isValid()
Returns true if this textureHandle is valid (has not been disposed of).


getControl

public OpenglControl getControl()
Returns the control this textureHandle is registered with.


getName

public java.lang.String getName()
Returns the unique name for the textureHandle.


getTexture

public com.sun.opengl.util.texture.Texture getTexture()
Returns the referenced Texture object. Returns null if the textureHandle has been disposed of; in that case you need to fetch a fresh handle.


setOpaque

public void setOpaque(boolean opaque)

isOpaque

public boolean isOpaque()