Class OGLRenderingEffects
java.lang.Object
org.web3d.vrml.renderer.ogl.browser.OGLRenderingEffects
- All Implemented Interfaces:
org.j3d.aviatrix3d.rendering.RenderEffectsProcessor
public class OGLRenderingEffects
extends Object
implements org.j3d.aviatrix3d.rendering.RenderEffectsProcessor
Pre and post frame rendering effects processing for any OpenGL renderer.
- Version:
- $Revision: 1.8 $
- Author:
- Justin Couch
-
Constructor Summary
ConstructorsConstructorDescriptionOGLRenderingEffects(org.j3d.aviatrix3d.SimpleScene scene) Construct a default instance initialised to have a mode of shaded rendering. -
Method Summary
Modifier and TypeMethodDescriptionvoidRequest notification of profiling information.voidStop capturing the screen on each render.voidcaptureScreenOnce(ScreenCaptureListener listener, int width, int height) Capture the screen on the next render.voidcaptureScreenStart(ScreenCaptureListener listener, int width, int height) Capture the screen on each render.intGet the currently set rendering style.voidpostDraw(com.jogamp.opengl.GL gl, org.j3d.aviatrix3d.rendering.ProfilingData profilingData, Object userData) Perform any post-rendering actions that you may need for this scene.voidPerform any pre-rendering setup that you may need for this scene.voidRemove notification of profiling information.voidsetRenderingStyle(int style) Change the rendering style that the browser should currently be using.
-
Constructor Details
-
OGLRenderingEffects
public OGLRenderingEffects(org.j3d.aviatrix3d.SimpleScene scene) Construct a default instance initialised to have a mode of shaded rendering.- Parameters:
scene-
-
-
Method Details
-
preDraw
Perform any pre-rendering setup that you may need for this scene. After this call, all normal scene graph rendering is performed by the surface.- Specified by:
preDrawin interfaceorg.j3d.aviatrix3d.rendering.RenderEffectsProcessor- Parameters:
gl- The current GL context wrapper to draw withuserData- Some identifiable data provided by the user
-
postDraw
public void postDraw(com.jogamp.opengl.GL gl, org.j3d.aviatrix3d.rendering.ProfilingData profilingData, Object userData) Perform any post-rendering actions that you may need for this scene. Called after the renderer has completed all drawing and just before the buffer swap. The only thing to be called after calling this method is glFlush().- Specified by:
postDrawin interfaceorg.j3d.aviatrix3d.rendering.RenderEffectsProcessor- Parameters:
gl- The current GL context wrapper to draw withprofilingData-userData- Some identifiable data provided by the user
-
addProfilingListener
Request notification of profiling information.- Parameters:
l- The listener
-
removeProfilingListener
Remove notification of profiling information.- Parameters:
l- The listener
-
setRenderingStyle
Change the rendering style that the browser should currently be using. Various options are available based on the constants defined in this interface.- Parameters:
style- One of the RENDER_* constants- Throws:
IllegalArgumentException- A style constant that is not recognized by the implementation was provided
-
getRenderingStyle
public int getRenderingStyle()Get the currently set rendering style. The default style is RENDER_SHADED.- Returns:
- one of the RENDER_ constants
-
captureScreenOnce
Capture the screen on the next render.- Parameters:
listener- Listener for capture resultswidth- The screen widthheight- The screen height
-
captureScreenStart
Capture the screen on each render.- Parameters:
listener- Listener for capture resultswidth- The screen widthheight- The screen height
-
captureScreenEnd
public void captureScreenEnd()Stop capturing the screen on each render.
-