Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer.ogl.browser
Class OGLRenderingEffects

java.lang.Object
  extended by org.web3d.vrml.renderer.ogl.browser.OGLRenderingEffects
All Implemented Interfaces:
org.j3d.aviatrix3d.rendering.RenderEffectsProcessor

public class OGLRenderingEffects
extends java.lang.Object
implements org.j3d.aviatrix3d.rendering.RenderEffectsProcessor

Pre and post frame rendering effects processing for any OpenGL renderer.

Version:
$Revision: 1.7 $
Author:
Justin Couch

Constructor Summary
OGLRenderingEffects(org.j3d.aviatrix3d.SimpleScene scene)
          Construct a default instance initialised to have a mode of shaded rendering.
 
Method Summary
 void addProfilingListener(ProfilingListener l)
          Request notification of profiling information.
 void captureScreenEnd()
          Stop cpaturing the screen on each render.
 void captureScreenOnce(ScreenCaptureListener listener, int width, int height)
          Capture the screen on the next render.
 void captureScreenStart(ScreenCaptureListener listener, int width, int height)
          Capture the screen on each render.
 int getRenderingStyle()
          Get the currently set rendering style.
 void postDraw(javax.media.opengl.GL gl, org.j3d.aviatrix3d.rendering.ProfilingData profilingData, java.lang.Object userData)
          Perform any post-rendering actions that you may need for this scene.
 void preDraw(javax.media.opengl.GL gl, java.lang.Object userData)
          Perform any pre-rendering setup that you may need for this scene.
 void removeProfilingListener(ProfilingListener l)
          Remove notification of profiling information.
 void setRenderingStyle(int style)
          Change the rendering style that the browser should currently be using.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OGLRenderingEffects

public OGLRenderingEffects(org.j3d.aviatrix3d.SimpleScene scene)
Construct a default instance initialised to have a mode of shaded rendering.

Method Detail

preDraw

public void preDraw(javax.media.opengl.GL gl,
                    java.lang.Object userData)
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:
preDraw in interface org.j3d.aviatrix3d.rendering.RenderEffectsProcessor
Parameters:
gl - The current GL context wrapper to draw with
userData - Some identifiable data provided by the user

postDraw

public void postDraw(javax.media.opengl.GL gl,
                     org.j3d.aviatrix3d.rendering.ProfilingData profilingData,
                     java.lang.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:
postDraw in interface org.j3d.aviatrix3d.rendering.RenderEffectsProcessor
Parameters:
gl - The current GL context wrapper to draw with
userData - Some identifiable data provided by the user

addProfilingListener

public void addProfilingListener(ProfilingListener l)
Request notification of profiling information.

Parameters:
l - The listener

removeProfilingListener

public void removeProfilingListener(ProfilingListener l)
Remove notification of profiling information.

Parameters:
l - The listener

setRenderingStyle

public void setRenderingStyle(int style)
                       throws java.lang.IllegalArgumentException
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:
java.lang.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

public void captureScreenOnce(ScreenCaptureListener listener,
                              int width,
                              int height)
Capture the screen on the next render.

Parameters:
listener - Listener for capture results
width - The screen width
height - The screen height

captureScreenStart

public void captureScreenStart(ScreenCaptureListener listener,
                               int width,
                               int height)
Capture the screen on each render.

Parameters:
listener - Listener for capture results
width - The screen width
height - The screen height

captureScreenEnd

public void captureScreenEnd()
Stop cpaturing the screen on each render.


Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium