|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object PGraphicsOpenGL codeanticode.glgraphics.GLGraphics
public class GLGraphics
This class implements a Processing renderer based on the OPENGL renderer. It accelerates rendering of OpenGL textures and adds some additional functionality such as OpenGL-based lights and blending, and VBO models.
Field Summary | |
---|---|
float[] |
currentLightSpecularGL
Current specular color for lighting |
Constructor Summary | |
---|---|
GLGraphics()
Default constructor. |
Method Summary | |
---|---|
void |
addWindow(GLWindow win)
Adds a GLWindow to be handled by this renderer. |
void |
ambientLight(float r,
float g,
float b)
Add an ambient light based on the current color mode. |
void |
ambientLight(float r,
float g,
float b,
float x,
float y,
float z)
Add an ambient light based on the current color mode. |
void |
beginDraw()
Prepares the renderer for drawing a new frame. |
GL |
beginGL()
Starts a block of direct OpenGL calls. |
void |
camera()
|
void |
camera(float eyeX,
float eyeY,
float eyeZ,
float centerX,
float centerY,
float centerZ,
float upX,
float upY,
float upZ)
|
void |
directionalLight(float r,
float g,
float b,
float nx,
float ny,
float nz)
|
void |
dispose()
Frees all remaining OpenGL resources. |
void |
endCamera()
|
void |
endDraw()
Cleans-up the drawing of last frame and renders the GLWindows attached to this renderer. |
void |
endGL()
Ends a block of direct OpenGL calls. |
void |
frustum(float left,
float right,
float bottom,
float top,
float near,
float far)
|
GLCapabilities |
getCapabilities()
Returns the current OpenGL capabilities associated to this renderer. |
static java.lang.String |
getVersion()
Returns the version string of the library. |
void |
lightFalloff(float constant,
float linear,
float quadratic)
Set the light falloff rates for the last light that was created. |
void |
lights()
|
void |
lightSpecular(float x,
float y,
float z)
Set the specular color of the last light created. |
void |
model(GLModel model)
|
void |
model(GLModel model,
float x,
float y,
float z,
int first,
int last,
GLModelEffect effect)
|
void |
model(GLModel model,
GLModelEffect effect)
|
void |
model(GLModel model,
int first,
int last)
|
void |
model(GLModel model,
int first,
int last,
GLModelEffect effect)
|
float |
modelX(float x,
float y,
float z)
|
float |
modelY(float x,
float y,
float z)
|
float |
modelZ(float x,
float y,
float z)
|
void |
noBlend()
|
void |
noLights()
|
void |
ortho()
|
void |
ortho(float left,
float right,
float bottom,
float top,
float near,
float far)
|
void |
perspective()
|
void |
perspective(float fov,
float aspect,
float near,
float far)
|
void |
pointLight(float r,
float g,
float b,
float x,
float y,
float z)
|
void |
popMatrix()
Restores the modelview matrix saved with the last call to |
void |
pushMatrix()
Saves the current modelview matrix. |
void |
removeWindow(GLWindow win)
Removes a GLWindow from by this renderer. |
void |
restoreLights()
|
void |
rotate(float angle)
|
void |
rotate(float angle,
float vx,
float vy,
float vz)
|
void |
rotateX(float angle)
|
void |
rotateY(float angle)
|
void |
rotateZ(float angle)
|
void |
saveLights()
|
void |
scale(float s)
|
void |
scale(float sx,
float sy)
|
void |
scale(float x,
float y,
float z)
|
float |
screenX(float x,
float y)
|
float |
screenX(float x,
float y,
float z)
|
float |
screenY(float x,
float y)
|
float |
screenY(float x,
float y,
float z)
|
float |
screenZ(float x,
float y,
float z)
|
void |
setBlendMode(int MODE)
|
void |
setDefaultBlend()
|
void |
setDepthMask(boolean value)
Enables/disables the use of the depth mask. |
void |
setSize(int iwidth,
int iheight)
Sets the size of the renderer's drawing surface. |
void |
spotLight(float r,
float g,
float b,
float x,
float y,
float z,
float nx,
float ny,
float nz,
float angle,
float concentration)
|
void |
translate(float tx,
float ty)
|
void |
translate(float tx,
float ty,
float tz)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float[] currentLightSpecularGL
Constructor Detail |
---|
public GLGraphics()
Method Detail |
---|
public void addWindow(GLWindow win)
win
- window objectpublic void removeWindow(GLWindow win)
win
- window objectpublic GLCapabilities getCapabilities()
public void setSize(int iwidth, int iheight)
iwidth
- new widthiwidth
- new heightpublic void dispose()
public GL beginGL()
public void endGL()
public void beginDraw()
public void endDraw()
public void setDepthMask(boolean value)
value
- the desired state for the use of depth masking.public static java.lang.String getVersion()
public void pushMatrix()
public void popMatrix()
pushMatrix.
public void translate(float tx, float ty)
public void translate(float tx, float ty, float tz)
public void rotate(float angle)
public void rotateX(float angle)
public void rotateY(float angle)
public void rotateZ(float angle)
public void rotate(float angle, float vx, float vy, float vz)
public void scale(float s)
public void scale(float sx, float sy)
public void scale(float x, float y, float z)
public void lights()
public void saveLights()
public void restoreLights()
public void noLights()
public void ambientLight(float r, float g, float b)
public void ambientLight(float r, float g, float b, float x, float y, float z)
public void directionalLight(float r, float g, float b, float nx, float ny, float nz)
public void pointLight(float r, float g, float b, float x, float y, float z)
public void spotLight(float r, float g, float b, float x, float y, float z, float nx, float ny, float nz, float angle, float concentration)
public void lightFalloff(float constant, float linear, float quadratic)
public void lightSpecular(float x, float y, float z)
public void endCamera()
public void camera()
public void camera(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ)
public void ortho()
public void ortho(float left, float right, float bottom, float top, float near, float far)
public void perspective()
public void perspective(float fov, float aspect, float near, float far)
public void frustum(float left, float right, float bottom, float top, float near, float far)
public float screenX(float x, float y)
public float screenY(float x, float y)
public float screenX(float x, float y, float z)
public float screenY(float x, float y, float z)
public float screenZ(float x, float y, float z)
public float modelX(float x, float y, float z)
public float modelY(float x, float y, float z)
public float modelZ(float x, float y, float z)
public void model(GLModel model)
public void model(GLModel model, GLModelEffect effect)
public void model(GLModel model, int first, int last)
public void model(GLModel model, int first, int last, GLModelEffect effect)
public void model(GLModel model, float x, float y, float z, int first, int last, GLModelEffect effect)
public void noBlend()
public void setDefaultBlend()
public void setBlendMode(int MODE)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |