com.threerings.opengl.renderer.config
Class TextureConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.config.ManagedConfig
          extended by com.threerings.config.ParameterizedConfig
              extended by com.threerings.opengl.renderer.config.TextureConfig
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, Exportable, com.threerings.resource.ResourceManager.ModificationObserver, Copyable, Cloneable

public class TextureConfig
extends ParameterizedConfig

Texture metadata.


Nested Class Summary
static class TextureConfig.Animated
          Switches between subtextures according to an expression.
static class TextureConfig.BaseDerived
          Base class of TextureConfig.BaseDerived and related implementations.
static class TextureConfig.CompareFunc
          Compare function constants.
static class TextureConfig.CompareMode
          Compare mode constants.
static class TextureConfig.CubeRender
          A dynamically rendered cube map.
static class TextureConfig.DepthMode
          Depth mode constants.
static class TextureConfig.Derived
          A derived implementation.
static class TextureConfig.Format
          Format constants.
static class TextureConfig.Frame
          A frame within an animated texture.
static class TextureConfig.Implementation
          Contains the actual implementation of the texture.
static class TextureConfig.MagFilter
          Magnification filter constants.
static class TextureConfig.MinFilter
          Minification filter constants.
static class TextureConfig.Original
          The superclass of the implementations describing an original texture, as opposed to one derived from another configuration.
static class TextureConfig.Original1D
          A 1D texture.
static class TextureConfig.Original2D
          A 2D texture.
static class TextureConfig.Original2DTarget
          A 2D texture that matches the dimensions of the render surface.
static class TextureConfig.Original3D
          A 3D texture.
static class TextureConfig.OriginalCubeMap
          A cube map texture.
static class TextureConfig.OriginalRectangle
          A 2D texture that uses the rectangle target.
static class TextureConfig.Reflection
          A planar reflection texture.
static class TextureConfig.Refraction
          A planar refraction texture.
static class TextureConfig.Wrap
          Wrap constants.
 
Field Summary
 TextureConfig.Implementation implementation
          The actual texture implementation.
 
Fields inherited from class com.threerings.config.ParameterizedConfig
parameters
 
Constructor Summary
TextureConfig()
           
 
Method Summary
 Texture getFromPool(GlContext ctx)
          Returns an instance of this texture from the shared pool.
static BufferedImage getImage(GlContext ctx, String file, ColorizationConfig[] colorizations)
          Gets the requested image from the cache and applies the specified colorizations.
 Texture getTexture(GlContext ctx)
          Returns the texture corresponding to this configuration.
 Texture getTexture(GlContext ctx, TextureState state, TextureUnit unit, Scope scope, List<Dependency.Adder> adders, List<Updater> updaters)
          Returns the (possibly dynamic) texture corresponding to this configuration.
 boolean isSupported(GlContext ctx, boolean fallback)
          Checks whether the texture configuration is supported.
 void returnToPool(GlContext ctx, Texture texture)
          Returns an instance of this texture to the shared pool.
 
Methods inherited from class com.threerings.config.ParameterizedConfig
getInstance, getParameter, getReference, validateOuters, validateReferences, wasUpdated
 
Methods inherited from class com.threerings.config.ManagedConfig
addListener, configUpdated, getConfigManager, getInstance, getInstance, getInstance, getInstance, getName, init, removeListener, resourceModified, setName, updateFromSource
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

implementation

@Editable
public TextureConfig.Implementation implementation
The actual texture implementation.

Constructor Detail

TextureConfig

public TextureConfig()
Method Detail

getImage

public static BufferedImage getImage(GlContext ctx,
                                     String file,
                                     ColorizationConfig[] colorizations)
Gets the requested image from the cache and applies the specified colorizations.


isSupported

public boolean isSupported(GlContext ctx,
                           boolean fallback)
Checks whether the texture configuration is supported.


getTexture

public Texture getTexture(GlContext ctx)
Returns the texture corresponding to this configuration.


getTexture

public Texture getTexture(GlContext ctx,
                          TextureState state,
                          TextureUnit unit,
                          Scope scope,
                          List<Dependency.Adder> adders,
                          List<Updater> updaters)
Returns the (possibly dynamic) texture corresponding to this configuration.


getFromPool

public Texture getFromPool(GlContext ctx)
Returns an instance of this texture from the shared pool.


returnToPool

public void returnToPool(GlContext ctx,
                         Texture texture)
Returns an instance of this texture to the shared pool.



Copyright © 2011. All Rights Reserved.