gestalt.p5
Class GestaltPlugIn

java.lang.Object
  extended by gestalt.render.MinimalRenderer
      extended by gestalt.render.BasicRenderer
          extended by gestalt.p5.GestaltPlugIn
All Implemented Interfaces:
Gestalt, GestaltKeyListener, GestaltMouseListener

public class GestaltPlugIn
extends BasicRenderer


Nested Class Summary
static interface GestaltPlugIn.GLFragments
           
 
Field Summary
 boolean copybackgroundcolor
           
static boolean SKIP_FIRST_FRAME
           
 
Fields inherited from class gestalt.render.MinimalRenderer
WORKAROUND_FORCE_QUIT
 
Fields inherited from interface gestalt.Gestalt
ALPHA, BIN_2D_BACKGROUND, BIN_2D_BACKGROUND_FINISH, BIN_2D_BACKGROUND_SETUP, BIN_2D_FOREGROUND, BIN_2D_FOREGROUND_FINISH, BIN_2D_FOREGROUND_SETUP, BIN_3D, BIN_3D_FINISH, BIN_3D_SETUP, BIN_ARBITRARY, BIN_FRAME_FINISH, BIN_FRAME_SETUP, BIN_NUMBER_OF_DEFAULT_BINS, BITMAP_BLENDFACTOR_DST_ALPHA, BITMAP_BLENDFACTOR_DST_COLOR, BITMAP_BLENDFACTOR_ONE, BITMAP_BLENDFACTOR_ONE_MINUS_DST_ALPHA, BITMAP_BLENDFACTOR_ONE_MINUS_DST_COLOR, BITMAP_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, BITMAP_BLENDFACTOR_ONE_MINUS_SRC_COLOR, BITMAP_BLENDFACTOR_SRC_ALPHA, BITMAP_BLENDFACTOR_SRC_ALPHA_SATURATE, BITMAP_BLENDFACTOR_SRC_COLOR, BITMAP_BLENDFACTOR_ZERO, BITMAP_BLENDMODE_ADD, BITMAP_BLENDMODE_ADD_2, BITMAP_BLENDMODE_MULTIPLY, BITMAP_BLENDMODE_OVERWRITE, BITMAP_COMPONENT_ORDER_BGRA, BITMAP_COMPONENT_ORDER_RGBA, BLUE, CAMERA_A_HANDY_ANGLE, CAMERA_CULLING_BACKFACE, CAMERA_CULLING_FRONT_AND_BACKFACE, CAMERA_CULLING_FRONTFACE, CAMERA_CULLING_NONE, CAMERA_MODE_LOOK_AT, CAMERA_MODE_ROTATE_XYZ, CAMERA_MODE_ROTATION_AXIS, ENGINE_JOGL, EPSILON, FOG_FILTER_EXP, FOG_FILTER_EXP2, FOG_FILTER_LINEAR, FONT_ALIGN_CENTER, FONT_ALIGN_LEFT, FONT_ALIGN_RIGHT, FONT_QUALITY_HIGH, FONT_QUALITY_LOW, FONT_STYLE_BOLD, FONT_STYLE_ITALIC, FONT_STYLE_REGULAR, GREEN, HINT_LEAVE_STATE_UNCHANGED, IMAGE_FILEFORMAT_JPEG, IMAGE_FILEFORMAT_PNG, IMAGE_FILEFORMAT_TGA, INTEL, KEYCODE_0, KEYCODE_1, KEYCODE_2, KEYCODE_3, KEYCODE_4, KEYCODE_5, KEYCODE_6, KEYCODE_7, KEYCODE_8, KEYCODE_9, KEYCODE_A, KEYCODE_B, KEYCODE_C, KEYCODE_D, KEYCODE_DOWN, KEYCODE_E, KEYCODE_ESCAPE, KEYCODE_F, KEYCODE_G, KEYCODE_H, KEYCODE_I, KEYCODE_J, KEYCODE_K, KEYCODE_L, KEYCODE_LEFT, KEYCODE_M, KEYCODE_META, KEYCODE_N, KEYCODE_O, KEYCODE_P, KEYCODE_PAGE_DOWN, KEYCODE_PAGE_UP, KEYCODE_Q, KEYCODE_R, KEYCODE_RIGHT, KEYCODE_S, KEYCODE_SHIFT, KEYCODE_SPACE, KEYCODE_T, KEYCODE_U, KEYCODE_UP, KEYCODE_V, KEYCODE_W, KEYCODE_X, KEYCODE_Y, KEYCODE_Z, LINE_PRIMITIVE_TYPE_LINE_LOOP, LINE_PRIMITIVE_TYPE_LINE_STRIP, LINE_PRIMITIVE_TYPE_LINES, MACOSX, MATERIAL_BLEND_ALPHA, MATERIAL_BLEND_BRIGHTER, MATERIAL_BLEND_CUSTOM, MATERIAL_BLEND_INVERS_MULTIPLY, MATERIAL_BLEND_MULTIPLY, MATERIAL_BLEND_WHITE_INVERT, MATERIAL_NORMAL_NORMALIZE, MATERIAL_NORMAL_RESCALE_NORMALS, MESH_LINE_LOOP, MESH_LINES, MESH_POINTS, MESH_POLYGON, MESH_QUAD_STRIP, MESH_QUADS, MESH_TRIANGLE_FAN, MESH_TRIANGLE_STRIP, MESH_TRIANGLES, MOUSEBUTTON_LEFT, MOUSEBUTTON_MIDDLE, MOUSEBUTTON_RIGHT, MOVIE_DIRECTION_BACKWARDS, MOVIE_DIRECTION_FORWARD, PI, PI_HALF, PICKING_BIN_2D, PICKING_BIN_3D, RED, SHAPE_CUBE_TEXTURE_SAME_FOR_EACH_SIDE, SHAPE_CUBE_TEXTURE_WRAP_AROUND, SHAPE_ORIGIN_BOTTOM_CENTERED, SHAPE_ORIGIN_BOTTOM_LEFT, SHAPE_ORIGIN_BOTTOM_RIGHT, SHAPE_ORIGIN_CENTERED, SHAPE_ORIGIN_CENTERED_LEFT, SHAPE_ORIGIN_CENTERED_RIGHT, SHAPE_ORIGIN_TOP_CENTERED, SHAPE_ORIGIN_TOP_LEFT, SHAPE_ORIGIN_TOP_RIGHT, SHAPE_TRANSFORM_MATRIX, SHAPE_TRANSFORM_MATRIX_AND_ROTATION, SHAPE_TRANSFORM_POSITION_AND_ROTATION, SHAPEBIN_SORT_BY_DISTANCE_TO_CAMERA, SHAPEBIN_SORT_BY_Z_DISTANCE_TO_CAMERAPLANE, SHAPEBIN_SORT_BY_Z_POSITION, SQRT_TWO, TEXTURE_FILTERTYPE_LINEAR, TEXTURE_FILTERTYPE_MIPMAP, TEXTURE_FILTERTYPE_NEAREST, TEXTURE_MEDIA_IMAGE_BGR, TEXTURE_PROPORTION_ARBITRARY, TEXTURE_PROPORTION_POWEROF2, TEXTURE_WRAPMODE_CLAMP, TEXTURE_WRAPMODE_CLAMP_TO_BORDER, TEXTURE_WRAPMODE_REPEAT, TWO_PI, UNDEFINED, USE_DISPLAY_LISTS
 
Constructor Summary
GestaltPlugIn(processing.core.PApplet theParent)
           
GestaltPlugIn(processing.core.PApplet theParent, boolean theMakeP5Friendly)
           
 
Method Summary
 void applyCamera(Camera theCamera)
          applies the state of a gestalt camera to the processing model-view-matrix.
static void applyCamera(processing.core.PGraphics g, Camera theCamera)
          applies the state of a gestalt camera to the processing model-view-matrix.
 void cameramover(boolean theState)
          this method activates a camera mover.
 void create(DisplayCapabilities theDisplayCapabilities)
          creates all context.
static IntegerBitmap createGestaltBitmap(processing.core.PImage thePImage)
          create a gestalt 'Bitmap' from a processing 'PImage'.
note that this method only copies the reference to the pixel data of the PImage.
 void decoration(boolean theDecoration)
           
static void decoration(processing.core.PApplet theParent, boolean theDecoration)
           
 void disable()
           
 void dispose()
           
 void draw()
           
 void enable()
           
 FPSCounter fpscounter(boolean theState)
           
 void fullscreen(boolean theSwitchResolution)
           
static void fullscreen(processing.core.PApplet theParent, boolean theSwitchResolution)
           
 GL getGL()
          use with care! using the instance might not work at all times, as opengl needs to be in the right mood to receive calls.
 GLU getGLU()
          use with care! using the instance might not work at all times, as opengl needs to be in the right mood to receive calls.
 boolean hasDrawError()
           
 void noFullscreen()
           
 void post()
           
 java.util.Vector<GestaltPlugIn.GLFragments> postDrawables()
           
 void pre()
           
 java.util.Vector<GestaltPlugIn.GLFragments> preDrawables()
           
 void size(int width, int height)
           
 void unplug()
           
 
Methods inherited from class gestalt.render.BasicRenderer
camera, dispose, fog, framefinish, framesetup, keyPressed, keyReleased, light, mousePressed, mouseReleased, origin, quit, replaceCamera, set3DFinishRef, setBinRef, setCameraRef, setFogRef, setFramefinishRef, setFramesetupRef, setLightRef, setOriginRef, setupDefaultRenderbins, toString
 
Methods inherited from class gestalt.render.MinimalRenderer
bin, bin, createDisplayCapabilities, display, displaycapabilities, drawablefactory, event, setDisplayRef, setDrawablefactoryRef, setEventRef, updateDisplayCapabilities
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SKIP_FIRST_FRAME

public static boolean SKIP_FIRST_FRAME

copybackgroundcolor

public boolean copybackgroundcolor
Constructor Detail

GestaltPlugIn

public GestaltPlugIn(processing.core.PApplet theParent)

GestaltPlugIn

public GestaltPlugIn(processing.core.PApplet theParent,
                     boolean theMakeP5Friendly)
Method Detail

unplug

public void unplug()

enable

public void enable()

disable

public void disable()

hasDrawError

public boolean hasDrawError()

create

public void create(DisplayCapabilities theDisplayCapabilities)
Description copied from class: BasicRenderer
creates all context. this method must be called before the renderer is actually used.

Overrides:
create in class BasicRenderer
Parameters:
theDisplayCapabilities - DisplayCapabilities

pre

public void pre()

draw

public void draw()

post

public void post()

dispose

public void dispose()

size

public void size(int width,
                 int height)

getGL

public GL getGL()
use with care! using the instance might not work at all times, as opengl needs to be in the right mood to receive calls.

Returns:
GL

getGLU

public GLU getGLU()
use with care! using the instance might not work at all times, as opengl needs to be in the right mood to receive calls.

Returns:
GLU

applyCamera

public void applyCamera(Camera theCamera)
applies the state of a gestalt camera to the processing model-view-matrix.

Parameters:
theCamera - Camera

applyCamera

public static void applyCamera(processing.core.PGraphics g,
                               Camera theCamera)
applies the state of a gestalt camera to the processing model-view-matrix.

Parameters:
g - PGraphics
theCamera - Camera

cameramover

public void cameramover(boolean theState)
this method activates a camera mover. ( see also gestalt.util.CameraMover )

Parameters:
theState - boolean

fpscounter

public FPSCounter fpscounter(boolean theState)

createGestaltBitmap

public static IntegerBitmap createGestaltBitmap(processing.core.PImage thePImage)
create a gestalt 'Bitmap' from a processing 'PImage'.
note that this method only copies the reference to the pixel data of the PImage.

Parameters:
thePImage - PImage
Returns:
IntegerBitmap

decoration

public static void decoration(processing.core.PApplet theParent,
                              boolean theDecoration)

decoration

public void decoration(boolean theDecoration)

fullscreen

public void fullscreen(boolean theSwitchResolution)

fullscreen

public static void fullscreen(processing.core.PApplet theParent,
                              boolean theSwitchResolution)

noFullscreen

public void noFullscreen()

preDrawables

public java.util.Vector<GestaltPlugIn.GLFragments> preDrawables()

postDrawables

public java.util.Vector<GestaltPlugIn.GLFragments> postDrawables()


processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009