gzz.gfx.gl
Class CachingPaperMill

java.lang.Object
  |
  +--gzz.gfx.gl.PaperMill
        |
        +--gzz.gfx.gl.CachingPaperMill

public class CachingPaperMill
extends PaperMill

A papermill instance that caches a predetermined number of papers.


Constructor Summary
CachingPaperMill(PaperMill realPaperMill, int n)
           
 
Method Summary
 Paper getOptimizedPaper(int seed, GraphicsAPI.RenderingSurface w)
          Get an optimized (rendered-to-texture) paper.
 Paper getPaper(int seed)
          Get the paper corresponding to the given seed.
 
Methods inherited from class gzz.gfx.gl.PaperMill
getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingPaperMill

public CachingPaperMill(PaperMill realPaperMill,
                        int n)
Method Detail

getOptimizedPaper

public Paper getOptimizedPaper(int seed,
                               GraphicsAPI.RenderingSurface w)
Description copied from class: PaperMill
Get an optimized (rendered-to-texture) paper. This will usually return a paper with a single pass and single texture, in which case you can set the texture environment (or fragment program) and add other papers.

HOWEVER, this does not work on ATI drivers; so it is not guaranteed that the paper will be like that. Check it first.

Overrides:
getOptimizedPaper in class PaperMill
See Also:
GL.workaroundStupidBuggyAtiDrivers

getPaper

public Paper getPaper(int seed)
Description copied from class: PaperMill
Get the paper corresponding to the given seed.

Specified by:
getPaper in class PaperMill