|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.threed.jpct.procs.BloomGLProcessor
An implementation of an IPostProcessor which implements a bloom effect (kind
of pseudo-HDR) for the OpenGL renderer. When run on a software renderer's
framebuffer, it's giving a warning once and does nothing afterwards.
The bloom effect can be configured by various variables in the constructor.
Constructor Summary | |
BloomGLProcessor()
Creates a bloom effect with default settings. |
|
BloomGLProcessor(int darkening,
int blur,
int strength,
int quality)
Creates a bloom effect on the framebuffer's content. |
Method Summary | |
void |
dispose()
Will be called when a post processor gets removed from a framebuffer and should be called, when the processor gets garbage collected. |
void |
init(FrameBuffer buffer)
Initialize the processor. |
boolean |
isDelayed()
Is the rendering delayed? |
boolean |
isInitialized()
Has to return true if the init()-method has run correctly and should return false after the processor has been disposed (but doesn't have to, if an implementation requires something else...no problem). |
void |
process()
Does the actual processing. |
void |
render()
Should be called to apply a delayed processor to the current framebuffer. |
void |
setCombining(boolean comb)
If set to false, only the blured version of the image will be shown, not the final result. |
void |
setDelayed(boolean delayed)
Sets the processor to delayed. |
void |
snapshot()
Takes a snapshot of the current scene. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BloomGLProcessor()
public BloomGLProcessor(int darkening, int blur, int strength, int quality)
darkening
- The higher this value, the more the bright areas will be
affected only. The lower it is, the more bloom effect even not
so bright areas of the screen will get. Increasing this value
slows down the process.blur
- Increasing this values leads to a higher blur but slower
performance. Increasing it to very high values leads to
strange artifacts.strength
- This controls the "strength" of the effect, i.e. how much the
"bloomed" image affects the actual rendering. Increasing it
slows down the processs.quality
- Increasing this value lowers(!) the quality of the texture map
used to do the post processing. 0 means that the texture has
the same size as the framebuffer, 1 means it's a quarter of
that size, 2 an eighth...Reasonable value are 1 and 2. The
higher the value, the higher the demand for fillrate, i.e. the
slower.Method Detail |
public void init(FrameBuffer buffer)
IPostProcessor
init
in interface IPostProcessor
buffer
- the FrameBufferpublic boolean isInitialized()
IPostProcessor
isInitialized
in interface IPostProcessor
public void setCombining(boolean comb)
comb
- boolean do the final step, or leave it out...public void process()
IPostProcessor
process
in interface IPostProcessor
public void dispose()
IPostProcessor
dispose
in interface IPostProcessor
public void snapshot()
public void render()
public void setDelayed(boolean delayed)
delayed
- should the rendering be delayed? Default is false.public boolean isDelayed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |