FFP_ACCUM, FFP_ACCUM_BUFFER, FFP_ADD, FFP_ALPHA_TEST, FFP_AMBIENT, FFP_AMBIENT_AND_DIFFUSE, FFP_ARGB, FFP_BACK, FFP_BILINEAR, FFP_CLIP_PLANE0, FFP_CLIP_PLANE1, FFP_CLIP_PLANE2, FFP_CLIP_PLANE3, FFP_CLIP_PLANE4, FFP_CLIP_PLANE5, FFP_COLOR_MATERIAL, FFP_COLORMAP, FFP_CONSTANT_ATTENUATION, FFP_COVERAGE_BUFFER, FFP_CULL_FACE, FFP_CURRENT_TEXTURES, FFP_DECAL, FFP_DEPTH_BUFFER, FFP_DEPTH_TEST, FFP_DIFFUSE, FFP_DITHER, FFP_DM_TEXTURE_2D, FFP_DM_TEXTURE_MATRIX, FFP_DM_TEXTURE_STACK_DEPTH, FFP_EMISSION, FFP_FALSE, FFP_FILL, FFP_FLAT, FFP_FOG, FFP_FRAME_POLYGON_COUNT, FFP_FRONT, FFP_FRONT_AND_BACK, FFP_GOURAUD, FFP_ID_BUFFER, FFP_INVALID_OPERATION, FFP_INVALID_PARAM, FFP_INVALID_VALUE, FFP_LIGHT_MODEL_AMBIENT, FFP_LIGHT_MODEL_LOCAL_VIEWER, FFP_LIGHT_MODEL_RGB, FFP_LIGHT_MODEL_TWO_SIDE, FFP_LIGHTING, FFP_LINE, FFP_LINE_LOOP, FFP_LINE_STIPPLE, FFP_LINE_STIPPLE_PATTERN, FFP_LINE_STIPPLE_REPEAT, FFP_LINE_STRIP, FFP_LINEAR_ATTENUATION, FFP_LINES, FFP_LOAD, FFP_MATRIX_MODE, FFP_MAX_ALLOCATED_TEXTURES, FFP_MAX_DM_TEXTURE_STACK_DEPTH, FFP_MAX_LIGHTS, FFP_MAX_MODELVIEW_STACK_DEPTH, FFP_MAX_PROJECTION_STACK_DEPTH, FFP_MAX_TEXTURE_SIZE, FFP_MAX_TEXTURE_STACK_DEPTH, FFP_MIX, FFP_MODELVIEW, FFP_MODELVIEW_MATRIX, FFP_MODELVIEW_STACK_DEPTH, FFP_MODULATE, FFP_MULT, FFP_MULTI_THREADED, FFP_NEAREST, FFP_NO_ERROR, FFP_NONE, FFP_NORMALIZE, FFP_NULL_POINTER, FFP_OUT_OF_MEMORY, FFP_PHONG, FFP_POINT, FFP_POINTS, FFP_POLYGON_MODE_BACK, FFP_POLYGON_MODE_FRONT, FFP_POLYGON_OFFSET_FILL, FFP_POLYGON_OFFSET_LINE, FFP_POLYGON_OFFSET_POINT, FFP_POLYGON_STIPPLE, FFP_POSITION, FFP_PROJECTION, FFP_PROJECTION_MATRIX, FFP_PROJECTION_STACK_DEPTH, FFP_QUAD_STRIP, FFP_QUADRATIC_ATTENUATION, FFP_QUADS, FFP_RENDER_EXCEPTION, FFP_RENDER_MODE_COVERAGE, FFP_RENDER_MODE_NORMAL, FFP_RENDER_TECHNIQUE_DEFERRED, FFP_RENDER_TECHNIQUE_FORWARD, FFP_RENDERED_POLYGON_COUNT, FFP_RENDERER, FFP_RETURN, FFP_RETURN_COLOR_VIDEO, FFP_RETURN_DEPTH_VIDEO, FFP_RGB, FFP_SHADE_MODEL, FFP_SHININESS, FFP_SINGLE_THREADED, FFP_SMOOTH, FFP_SMOOTH_MODEL, FFP_SPECULAR, FFP_SPOT_CUTOFF, FFP_SPOT_DIRECTION, FFP_SPOT_EXPONENT, FFP_STACK_OVERFLOW, FFP_STACK_UNDERFLOW, FFP_TEXTURE_2D, FFP_TEXTURE_BLOCK_FILTER, FFP_TEXTURE_ENV_MODE, FFP_TEXTURE_FILTER, FFP_TEXTURE_MATRIX, FFP_TEXTURE_SPHERE_MAP, FFP_TEXTURE_STACK_DEPTH, FFP_THREAD_COUNT_ALL, FFP_THREAD_COUNT_HALF, FFP_THREAD_COUNT_QUARTER, FFP_THREAD_COUNT_THREE_QUARTERS, FFP_TRIANGLE_FAN, FFP_TRIANGLE_STRIP, FFP_TRIANGLES, FFP_TRUE, FFP_VENDOR, FFP_VERSION, FFP_VIDEO_BLEND_STIPPLED_REGIONS, FFP_VIDEO_BUFFER, FFP_VIDEO_COLOR_DITHER, FFP_VIDEO_DITHER_MATRIX, FFP_VIDEO_DITHER_MATRIX0, FFP_VIDEO_DITHER_MATRIX1, FFP_VIDEO_DITHER_MATRIX2, FFP_VIDEO_DITHER_MATRIX3, FFP_VIDEO_GAMMA, FFP_VIDEO_THREAD_COUNT, FFP_VIEWPORT, FFPAUX_FALSE, FFPAUX_FILL, FFPAUX_FLAT, FFPAUX_INSIDE, FFPAUX_LINE, FFPAUX_NONE, FFPAUX_OUTSIDE, FFPAUX_POINT, FFPAUX_SILHOUETTE, FFPAUX_SMOOTH, FFPAUX_TRUE
Constructor and Description |
---|
FFP() |
Modifier and Type | Method and Description |
---|---|
void |
ffpAccum(int op,
float value)
Perform operations on/with the accumulation buffer.
|
void |
ffpAlphaRef(int ref)
Specifies the reference alpha value that fragments get tested against
when FFP_ALPHA_TEST is enabled.
|
void |
ffpBegin(int mode)
Begins the definition of a primitive, or multiple primitives between
this function call and a subsequent
ffpEnd() call. |
void |
ffpBindTexture(int type,
int id)
Sets the current texture.
|
void |
ffpClear(int mask)
Clears the buffer(s) referred to by the
mask parameter. |
void |
ffpClearAccum(float red,
float green,
float blue)
Specifies the color that the accumulation buffer gets set to
when
ffpClear(int) is called with the FFP_ACCUM_BUFFER mask. |
void |
ffpClearAccum(int red,
int green,
int blue)
Specifies the color that the video buffer gets set to
when
ffpClear(int) is called with the FFP_ACCUM_BUFFER mask. |
void |
ffpClearColor(float red,
float green,
float blue)
Specifies the color that the video buffer gets set to
when
ffpClear(int) is called with the FFP_VIDEO_BUFFER mask. |
void |
ffpClearColor(int red,
int green,
int blue)
Specifies the color that the video buffer gets set to
when
ffpClear(int) is called with the FFP_VIDEO_BUFFER mask. |
void |
ffpClipPlane(int plane,
float[] equation)
Specify an arbitrary clipping plane.
|
void |
ffpColor1f(float gray)
Sets the current color to a gray color.
|
void |
ffpColor1fv(float[] gray)
Sets the current color to a gray color stored in the array
gray . |
void |
ffpColor1ub(int gray)
Sets the current color to a gray color.
|
void |
ffpColor1ubv(int[] gray)
Sets the current color to a gray color stored in the array
gray . |
void |
ffpColor3f(float red,
float green,
float blue)
Sets the current color.
|
void |
ffpColor3fv(float[] v)
Sets the current color to the color stored in the array
v . |
void |
ffpColor3ub(int red,
int green,
int blue)
Sets the current color.
|
void |
ffpColor3ubv(int[] v)
Sets the current color to the color stored in the array
v . |
void |
ffpColormapCreate(int red_shades,
int green_shades,
int blue_shades)
Creates a 256 color colormap for dithering with the provided color resolution.
|
void |
ffpColormapEntry(int index,
float r,
float g,
float b)
Sets an entry in the 256 color dither colormap.
|
void |
ffpColormapEntry(int index,
int r,
int g,
int b)
Sets an entry in the 256 color dither colormap.
|
void |
ffpColorMaterial(int mode)
Sets which property of the current material the engine will track
|
void |
ffpCopyTexImage2D(int type,
int x,
int y,
int width,
int height)
Loads pixels from frame buffer into the current texture.
|
void |
ffpCopyTexSubImage2D(int type,
int xoffset,
int yoffset,
int x,
int y,
int width,
int height)
Replace all or part of the current texture image with a rectangular region of the frame buffer.
|
boolean |
ffpCoverageBufferFilled()
Checks if the entire view is filled by the coverage buffer.
|
void |
ffpCoverageTest(int cov)
If set to true, Subsequent draw functions only render to the pixels that were drawn to the coverage buffer.
|
void |
ffpCoverageWritemask(int write)
Sets the writemask for the 1-bit Coverage buffer.
|
void |
ffpCullFace(int mode)
Set which face gets culled when FFP_CULL_FACE is enabled.
|
void |
ffpDeleteAllTextures()
Deletes all of the textures.
|
void |
ffpDeleteTexture(int id)
Deletes the texture with the given id.
|
void |
ffpDepthWritemask(int write)
Sets the writemask to the depth buffer.
|
void |
ffpDisable(int state)
Disables a state.
|
void |
ffpDisableLight(int light)
Disables the light source with the given light id.
|
void |
ffpDMTexCoord2f(float u,
float v)
Sets the current double map (DM) texture coordinate.
|
void |
ffpDMTexCoord2fv(float[] v)
Sets the current double map (DM) texture coordinate to values stored in the array
v . |
void |
ffpDMTexCoord2i(int u,
int v)
Sets the current double map (DM) texture coordinate.
|
void |
ffpDMTexCoord2iv(int[] v)
Sets the current double map (DM) texture coordinate to values stored in the array
v . |
void |
ffpEnable(int state)
Enables a state.
|
void |
ffpEnableLight(int light)
Enables the light source with the given light id.
|
void |
ffpEnd()
Ends the definition of a primitive, or multiple primitives
that have been defined between this function call and the
previous
ffpBegin(int) call. |
void |
ffpFlush(int thread_param)
Draws all the pixels to the video buffer specified by
ffpVideoOutput(int[], int, int)
and applies all post-processing effects. |
void |
ffpFogColor(int red,
int green,
int blue)
Sets the color of the fog.
|
void |
ffpFogEnd(float end)
Sets the end value of the fog.
|
void |
ffpFogStart(float start)
Sets the start value of the fog.
|
void |
ffpFrustum(float left,
float right,
float bottom,
float top,
float near,
float far)
Multiplies the current matrix with a perspective projection matrix.
|
int |
ffpGetCurrentMode()
Gets the current primitive mode.
|
float[] |
ffpGetFloatv(int property,
float[] params)
Gets a float value or multiple float values from the engine.
|
int |
ffpGetIDAt(int x,
int y)
Gets the ID value from the id buffer at the given (x,y) window coordinate.
|
int |
ffpGetInteger(int property)
Gets an integer value from the engine.
|
int[] |
ffpGetIntegerv(int property,
int[] params)
Gets an integer value or multiple integer values from the engine.
|
java.lang.String |
ffpGetString(int name)
Gets a
String value from the engine. |
void |
ffpIDVal(int id)
Specifies the value that the next rendering commands will
write to the id buffer.
|
void |
ffpIDWritemask(int write)
Sets the writemask to the id buffer.
|
boolean |
ffpIsEnabled(int state)
Checks if the specified state is enabled.
|
boolean |
ffpIsLightEnabled(int light)
Returns a boolean that says if the light with the given light id is
currently enabled.
|
boolean |
ffpIsTexture(int id)
Returns a boolean that says whether or not the texture with the given id is null.
|
void |
ffpLightf(int light,
int property,
float param)
Sets light properties for the light with the given id.
|
void |
ffpLightfv(int light,
int property,
float[] params)
Sets light properties for the light with the given id.
|
void |
ffpLightiv(int light,
int property,
int[] params)
Sets light properties for the light with the given id.
|
void |
ffpLightModelfv(int property,
float[] param)
Sets a light model property.
|
void |
ffpLightModeli(int property,
int param)
Sets a light model property.
|
void |
ffpLightModeliv(int property,
int[] param)
Sets a light model property.
|
void |
ffpLineStipple(int factor,
short pattern)
Sets the current stippling pattern for lines.
|
void |
ffpLineWidth(int width)
Sets the width, in pixels, for lines.
|
void |
ffpLoadIdentity()
Clears the current matrix and replaces it with the identity matrix.
|
void |
ffpLoadMatrixf(float[] m)
Clears the current matrix and replaces it with the given matrix.
|
void |
ffpLoadTransposeMatrixf(float[] m)
Replaces the current matrix with the transposed version of the given matrix.
|
void |
ffpMaterialf(int property,
float param)
Sets material properties for the current material.
|
void |
ffpMaterialfv(int property,
float[] params)
Sets material properties for the current material.
|
void |
ffpMateriali(int property,
int param)
Sets material properties for the current material.
|
void |
ffpMaterialiv(int property,
int[] params)
Sets material properties for the current material.
|
void |
ffpMatrixMode(int mode)
Specifies the matrix stack that subsequent matrix manipulation functions
will affect.
|
void |
ffpMultMatrixf(float[] m)
Multiplies the current matrix with the given matrix.
|
void |
ffpMultTransposeMatrixf(float[] m)
Multiplies the current matrix with the transposed version of the given matrix.
|
void |
ffpNormal3f(float x,
float y,
float z)
Specifies the (
x , y , z ) coordinates of a normal vector. |
void |
ffpNormal3fv(float[] v)
Specifies the (
x , y , z ) coordinates of a normal vector that
are stored in the array v . |
void |
ffpOrtho(float left,
float right,
float bottom,
float top,
float near,
float far)
Multiplies the current matrix with an orthographic projection matrix.
|
void |
ffpPointSize(float size)
Sets the size of the points drawn with FFP_POINTS.
|
void |
ffpPointSize(int size)
Sets the size of the points drawn with FFP_POINTS.
|
void |
ffpPolygonMode(int face,
int mode)
Sets the polygon drawing mode.
|
void |
ffpPolygonOffset(float factor,
float units)
Set the factor and units for polygon offsetting.
|
void |
ffpPolygonStipple(byte[] mask)
Set the current stipple pattern (only applies to polygons that are filled).
|
void |
ffpPolygonStipple(int[] mask)
Set the current stipple pattern (only applies to polygons that are filled).
|
void |
ffpPolygonStipple(short[] mask)
Set the current stipple pattern (only applies to polygons that are filled).
|
void |
ffpPopMatrix()
Pops the current matrix stack.
|
void |
ffpPushMatrix()
Pushes a copy of the current matrix to the top of the stack.
|
void |
ffpRectf(float x1,
float y1,
float x2,
float y2)
Draws a rectangle with the given vertices.
|
void |
ffpRectfv(float[] v1,
float[] v2)
Draws a rectangle with the given vertices.
|
void |
ffpRecti(int x1,
int y1,
int x2,
int y2)
Draws a rectangle with the given vertices.
|
void |
ffpRectiv(int[] v1,
int[] v2)
Draws a rectangle with the given vertices.
|
void |
ffpRenderMode(int mode)
Sets the rendering mode.
|
void |
ffpRenderTechnique(int technique)
Sets the rendering technique.
|
void |
ffpRenderToCoverageBuffer(int cov)
Draw directly to the coverage buffer without drawing to the screen.
|
void |
ffpResetStatistics()
Resets any statistics that the engine had kept track of in the last frame.
|
void |
ffpRotatef(float angle,
float x,
float y,
float z)
Multiplies the current matrix by a rotation matrix.
|
void |
ffpScalef(float x,
float y,
float z)
Multiplies the current matrix by a scaling matrix.
|
void |
ffpShadeModel(int param)
Sets the current shading model of the rasterizer.
|
void |
ffpSmoothModel(int param)
Sets the current smooth shading model of the rasterizer.
|
void |
ffpState(int state,
boolean b)
Enables or disables a state.
|
void |
ffpTexBlockFilterEnd(float end)
Sets the end value of the block filtering.
|
void |
ffpTexBlockFilterStart(float start)
Sets the start value of the block filtering.
|
void |
ffpTexCoord2f(float u,
float v)
Sets the current texture coordinate.
|
void |
ffpTexCoord2fv(float[] v)
Sets the current texture coordinate to the values stored in the array
v . |
void |
ffpTexCoord2i(int u,
int v)
Sets the current texture coordinate.
|
void |
ffpTexCoord2iv(int[] v)
Sets the current texture coordinate to the values stored in the array
v . |
void |
ffpTexImage2D(int type,
int format,
int[] data,
int width,
int height)
Loads pixels into the current texture.
|
void |
ffpTexParameteri(int type,
int property,
int param)
Sets texture parameters for the current texture.
|
void |
ffpTexSubImage2D(int type,
int xoffset,
int yoffset,
int width,
int height,
int[] data)
Replace all or part of the current texture image.
|
void |
ffpTranslatef(float x,
float y,
float z)
Multiplies the current matrix by a translation matrix.
|
void |
ffpVertex2f(float x,
float y)
Specifies the (
x , y ) coordinates of a vertex. |
void |
ffpVertex2fv(float[] v)
Specifies the (
x , y ) coordinates of a vertex that
are stored in the array v . |
void |
ffpVertex2i(int x,
int y)
Specifies the (
x , y ) coordinates of a vertex. |
void |
ffpVertex2iv(int[] v)
Specifies the (
x , y ) coordinates of a vertex that
are stored in the array v . |
void |
ffpVertex3f(float x,
float y,
float z)
Specifies the (
x , y , z ) coordinates of a vertex. |
void |
ffpVertex3fv(float[] v)
Specifies the (
x , y , z ) coordinates of a vertex that
are stored in the array v . |
void |
ffpVideoOutput(int[] output,
int width,
int height)
Specifies the main video buffer that the engine will directly write to.
|
void |
ffpVideoPropertyf(int property,
float param)
Sets a video property to
param . |
void |
ffpVideoPropertyi(int property,
int param)
Sets a video property to
param . |
void |
ffpVideoReturnData(int return_data)
Specifies what type of video data FFP returns.
|
void |
ffpViewport(int x,
int y,
int width,
int height)
Specifies a virtual viewport with its upper left corner at (
x , y )
and a given horizontal width and vertical height . |
public void ffpClearColor(int red, int green, int blue)
ffpClear(int)
is called with the FFP_VIDEO_BUFFER mask.red
- the value of the red channel in [0..255]green
- the value of the green channel in [0..255]blue
- the value of the blue channel in [0..255]ffpClearColor(float, float, float)
,
ffpClear(int)
public void ffpClearColor(float red, float green, float blue)
ffpClear(int)
is called with the FFP_VIDEO_BUFFER mask.red
- the value of the red channel in [0..1]green
- the value of the green channel in [0..1]blue
- the value of the blue channel in [0..1]ffpClearColor(int, int, int)
,
ffpClear(int)
public void ffpClearAccum(int red, int green, int blue)
ffpClear(int)
is called with the FFP_ACCUM_BUFFER mask.red
- the value of the red channel in [0..255]green
- the value of the green channel in [0..255]blue
- the value of the blue channel in [0..255]ffpClearAccum(float, float, float)
,
ffpClear(int)
public void ffpClearAccum(float red, float green, float blue)
ffpClear(int)
is called with the FFP_ACCUM_BUFFER mask.red
- the value of the red channel in [0..1]green
- the value of the green channel in [0..1]blue
- the value of the blue channel in [0..1]ffpClearAccum(int, int, int)
,
ffpClear(int)
public void ffpClear(int mask)
mask
parameter.mask
- the mask that specifies the buffer(s) to clear.ffpClearColor(int, int, int)
,
ffpClearColor(float, float, float)
,
ffpClearAccum(int, int, int)
,
ffpClearAccum(float, float, float)
public void ffpDepthWritemask(int write)
The parameter can be either FFP_TRUE or FFP_FALSE.
write
- sets the depth buffer to writeable or notpublic void ffpIDWritemask(int write)
The parameter can be either FFP_TRUE or FFP_FALSE.
write
- sets the id buffer to writeable or notpublic void ffpIDVal(int id)
NOTE: the default id is zero.
id
- the idpublic int ffpGetIDAt(int x, int y)
NOTE: x and y are relative to the main frame buffer specified by ffpVideoOutput(int[], int, int)
x
- the x coordinate of the pointy
- the y coordinate of the pointpublic void ffpAccum(int op, float value)
IMPORTANT: Due to the nature of a deferred renderer, ffpFlush() must be called before any values are available in the video buffer.
This means that, unlike a forward renderer, an ffpAccum call must be made after ffpFlush() or else undefined behavior may occur.
op
- the operationvalue
- the number to be applied in the operationpublic void ffpVideoPropertyi(int property, int param)
param
.property
- the property to changeparam
- the value to change the property topublic void ffpVideoPropertyf(int property, float param)
param
.property
- the property to changeparam
- the value to change the property topublic void ffpVideoReturnData(int return_data)
Can be either FFP_RETURN_COLOR_VIDEO or FFP_RETURN_DEPTH_VIDEO.
return_data
- the data typepublic void ffpColormapCreate(int red_shades, int green_shades, int blue_shades)
To set entries in the colormap individually, see ffpColormapEntry(int, int, int, int)
.
red_shades
- the number of shades of red in the colormapgreen_shades
- the number of shades of green in the colormapblue_shades
- the number of shades of blue in the colormappublic void ffpColormapEntry(int index, int r, int g, int b)
index
- the index in the colormap in [0..255]r
- the red channel in [0..255]g
- the green channel in [0..255]b
- the blue channel in [0..255]public void ffpColormapEntry(int index, float r, float g, float b)
index
- the index in the colormap in [0..255]r
- the red channel in [0..1]g
- the green channel in [0..1]b
- the blue channel in [0..1]public void ffpCullFace(int mode)
FFP_FRONT culls front faces, FFP_BACK culls back faces.
mode
- specifies which face side to cullpublic void ffpLineStipple(int factor, short pattern)
The pattern argument is a 16-bit integer whose bits are used to determine which pixels on a line are drawn and which are not. A 1 bit denotes a pixel that will get drawn and a 0 bit denotes a pixel that will not be drawn. The bits are read from LSB to MSB and the pattern will repeat until the line is finished drawing. The pattern can be scaled with factor.
factor
- the count clamped to [1..255]pattern
- patternpublic void ffpLineWidth(int width)
width must be greater than 0.
width
- the width of a line (defaults to 1).public void ffpPolygonMode(int face, int mode)
face
- which face side to set the mode formode
- the drawing mode for the facepublic void ffpPolygonOffset(float factor, float units)
factor
- scale factor for the offset (the big step)units
- the units (the little step, for precision)public void ffpPolygonStipple(byte[] mask)
mask is interpreted as a 32x32 bitmap. Since the entire bitmap contains 1024 bits, 128 bytes are needed. A 1 bit means that a pixel is filled, a 0 bit means that the pixel is skipped.
mask
- the mask bitmap - must be length 128ffpPolygonStipple(short[])
public void ffpPolygonStipple(short[] mask)
mask is interpreted as a 32x32 bitmap. Since the entire bitmap contains 1024 bits, 128 bytes are needed. A 1 bit means that a pixel is filled, a 0 bit means that the pixel is skipped.
NOTE: this is a convenience method that works around Java's bytes that can only be signed. Although this function takes a short array as a parameter, the values in it will still be treated as bytes and therefore will be converted to the standard signed byte range when loaded in.
mask
- the mask bitmap - must be length 128ffpPolygonStipple(byte[])
public void ffpPolygonStipple(int[] mask)
mask is interpreted as a 32x32 bitmap. Since the entire bitmap contains 1024 bits, 128 bytes are needed. A 1 bit means that a pixel is filled, a 0 bit means that the pixel is skipped.
NOTE: this is a convenience method that treats the 'int' primitive as a series of four bytes.
mask
- the mask bitmap - must be length 32 (because 32 * 4 = 128 bytes)ffpPolygonStipple(byte[])
public void ffpAlphaRef(int ref)
IMPORTANT: ANY rendering done in between ffpEnable(FFP_ALPHA_TEST) and ffpDisable(FFP_ALPHA_TEST) WILL be rendered in the forward renderer!
ref
- the reference alpha in [0..255].public void ffpEnable(int state)
This function is identical to ffpState(cap, true)
state
- the state to enableffpDisable(int)
public void ffpDisable(int state)
This function is identical to ffpState(cap, false)
state
- the state to disableffpEnable(int)
public void ffpState(int state, boolean b)
state
- the state to enable/disableb
- true to enable the state, false to disable the stateffpEnable(int)
,
ffpDisable(int)
public boolean ffpIsEnabled(int state)
state
- the state to checkffpEnable(int)
,
ffpDisable(int)
public float[] ffpGetFloatv(int property, float[] params)
property
- the property to getparams
- the array that will store the resultparams
argumentpublic int[] ffpGetIntegerv(int property, int[] params)
property
- the property to getparams
- the array that will store the resultparams
argumentpublic int ffpGetInteger(int property)
property
- the property to getpublic int ffpGetCurrentMode()
public void ffpRenderMode(int mode)
mode
- the modepublic void ffpRenderTechnique(int technique)
technique
- the techniquepublic java.lang.String ffpGetString(int name)
String
value from the engine.name
- the name of the property to getString
value requestedpublic void ffpVideoOutput(int[] output, int width, int height)
Note: video buffer modification times are different depending on
which renderer is active. The deferred renderer will only modify this
buffer when ffpFlush(int)
is called, the forward renderer modifies
this buffer whenever drawing commands are sent to the engine.
output
- the video bufferwidth
- the width of the area the buffer is representingheight
- the height of the area the buffer is representingffpViewport(int, int, int, int)
public void ffpFlush(int thread_param)
ffpVideoOutput(int[], int, int)
and applies all post-processing effects.
This function should be called after all drawing is finished.
thread_param
- specifies if the rendering should be done in
one thread or as many threads as possiblepublic void ffpResetStatistics()
ffpFlush(int)
always calls this method after it is finished.
public void ffpClipPlane(int plane, float[] equation)
plane
- specifies which clipping plane is being defined by this function.
The value must be in [FFP_CLIP_PLANE0..FFP_CLIP_PLANE5]equation
- the plane equation consisting of four values: A,B,C,D at
indices: 0,1,2,3, respectively. These values define the coefficients for the plane
equation Ax + By + Cz + D = 0public void ffpMatrixMode(int mode)
mode
- the mode to make currentpublic void ffpOrtho(float left, float right, float bottom, float top, float near, float far)
left
- left vertical clipping planeright
- right vertical clipping planebottom
- bottom horizontal clipping planetop
- top horizontal clipping planenear
- near depth clipping plane (if the value is negative, the plane will be behind the viewer)far
- far depth clipping plane (if the value is negative, the plane will be behind the viewer)public void ffpFrustum(float left, float right, float bottom, float top, float near, float far)
left
- left vertical clipping planeright
- right vertical clipping planebottom
- bottom horizontal clipping planetop
- top horizontal clipping planenear
- near depth clipping plane (must be positive)far
- far depth clipping plane (must be positive)public void ffpViewport(int x, int y, int width, int height)
x
, y
)
and a given horizontal width
and vertical height
.x
- upper left x coordinatey
- upper left y coordinatewidth
- horizontal width, in pixels, of the viewport (must be > 0)height
- vertical height, in pixels, of the viewport (must be > 0)ffpVideoOutput(int[], int, int)
public void ffpPushMatrix()
ffpPopMatrix()
public void ffpPopMatrix()
ffpPushMatrix()
public void ffpLoadIdentity()
public void ffpLoadMatrixf(float[] m)
m
- the matrix to replace the current matrix with (must be length 16)public void ffpMultMatrixf(float[] m)
m
- the matrix to multiply the current matrix with (must be length 16)public void ffpLoadTransposeMatrixf(float[] m)
m
- the matrix to transpose and replace the current matrix with (must be length 16)public void ffpMultTransposeMatrixf(float[] m)
m
- the matrix to transpose and multiply the current matrix with (must be length 16)public void ffpRotatef(float angle, float x, float y, float z)
angle
- the angle to rotate, in degreesx
- the x coordinate of the rotation vectory
- the y coordinate of the rotation vectorz
- the z coordinate of the rotation vectorpublic void ffpScalef(float x, float y, float z)
x
- scale factor along x axisy
- scale factor along y axisz
- scale factor along z axispublic void ffpTranslatef(float x, float y, float z)
x
- the x coordinate of the translation vectory
- the y coordinate of the translation vectorz
- the z coordinate of the translation vectorpublic void ffpBegin(int mode)
ffpEnd()
call.mode
- the geometric primitive(s) to begin definingffpEnd()
public void ffpEnd()
ffpBegin(int)
call.ffpBegin(int)
public void ffpRectf(float x1, float y1, float x2, float y2)
This is a convenience method that creates an FFP_QUAD.
x1
- first vertex x coordinatey1
- first vertex y coordinatex2
- second vertex x coordinatey2
- second vertex y coordinatepublic void ffpRecti(int x1, int y1, int x2, int y2)
This is a convenience method that creates an FFP_QUAD.
x1
- first vertex x coordinatey1
- first vertex y coordinatex2
- second vertex x coordinatey2
- second vertex y coordinatepublic void ffpRectfv(float[] v1, float[] v2)
This is a convenience method that creates an FFP_QUAD.
v1
- first vertex with x and y being stored in v1[0] and v1[1], respectively.v2
- second vertex with x and y being stored in v2[0] and v2[1], respectively.public void ffpRectiv(int[] v1, int[] v2)
This is a convenience method that creates an FFP_QUAD.
v1
- first vertex with x and y being stored in v1[0] and v1[1], respectively.v2
- second vertex with x and y being stored in v2[0] and v2[1], respectively.public void ffpVertex2i(int x, int y)
x
, y
) coordinates of a vertex.
The z coordinate defaults to 0 and the w coordinates default to 1.
x
- the x coordinate of the vertexy
- the y coordinate of the vertexpublic void ffpVertex2iv(int[] v)
x
, y
) coordinates of a vertex that
are stored in the array v
.
The z coordinate defaults to 0 and the w coordinates default to 1.
v
- the array containing the x coordinate in v[0] and the
y coordinate in v[1]public void ffpVertex2f(float x, float y)
x
, y
) coordinates of a vertex.
The z coordinate defaults to 0 and the w coordinates default to 1.
x
- the x coordinate of the vertexy
- the y coordinate of the vertexpublic void ffpVertex2fv(float[] v)
x
, y
) coordinates of a vertex that
are stored in the array v
.
The z coordinate defaults to 0 and the w coordinates default to 1.
v
- the array containing the x coordinate in v[0] and the
y coordinate in v[1]public void ffpVertex3f(float x, float y, float z)
x
, y
, z
) coordinates of a vertex.
The w coordinate defaults to 1.
x
- the x coordinate of the vertexy
- the y coordinate of the vertexz
- the z coordinate of the vertexpublic void ffpVertex3fv(float[] v)
x
, y
, z
) coordinates of a vertex that
are stored in the array v
.
The w coordinate defaults to 1.
v
- the array containing the x coordinate in v[0], the
y coordinate in v[1], and the z coordinate in v[2]public void ffpNormal3f(float x, float y, float z)
x
, y
, z
) coordinates of a normal vector.x
- the x coordinate of the vertexy
- the y coordinate of the vertexz
- the z coordinate of the vertexpublic void ffpNormal3fv(float[] v)
x
, y
, z
) coordinates of a normal vector that
are stored in the array v
.v
- the array containing the x coordinate in v[0], the
y coordinate in v[1], and the z coordinate in v[2]public void ffpColor1ub(int gray)
The parameter is applied to all three color channels to produce a gray color.
gray
- the gray value in [0..255]public void ffpColor1ubv(int[] gray)
gray
.
The parameter is applied to all three color channels to produce a gray color.
gray
- the array containing the gray value in [0..255]public void ffpColor1f(float gray)
The parameter is applied to all three color channels to produce a gray color.
gray
- the gray value in [0..1]public void ffpColor1fv(float[] gray)
gray
.
The parameter is applied to all three color channels to produce a gray color.
gray
- the array containing the gray value in [0..1]public void ffpColor3ub(int red, int green, int blue)
red
- the value of the red channel in [0..255]green
- the value of the green channel in [0..255]blue
- the value of the blue channel in [0..255]public void ffpColor3ubv(int[] v)
v
.v
- the array containing the red (v[0]), green (v[1]), and blue (v[2]) values
that each range from [0..255]public void ffpColor3f(float red, float green, float blue)
red
- the value of the red channel in [0..1]green
- the value of the green channel in [0..1]blue
- the value of the blue channel in [0..1]public void ffpColor3fv(float[] v)
v
.v
- the array containing the red (v[0]), green (v[1]), and blue (v[2]) values
that each range from [0..1]public void ffpTexCoord2f(float u, float v)
u
- the u coordinatev
- the v coordinatepublic void ffpTexCoord2fv(float[] v)
v
.v
- the array containing the u (v[0]) and the v (v[1]) coordinatespublic void ffpDMTexCoord2f(float u, float v)
u
- the u coordinatev
- the v coordinatepublic void ffpDMTexCoord2fv(float[] v)
v
.v
- the array containing the u (v[0]) and the v (v[1]) coordinatespublic void ffpTexCoord2i(int u, int v)
u
- the u coordinatev
- the v coordinatepublic void ffpTexCoord2iv(int[] v)
v
.v
- the array containing the u (v[0]) and the v (v[1]) coordinatespublic void ffpDMTexCoord2i(int u, int v)
u
- the u coordinatev
- the v coordinatepublic void ffpDMTexCoord2iv(int[] v)
v
.v
- the array containing the u (v[0]) and the v (v[1]) coordinatespublic void ffpShadeModel(int param)
FFP_SMOOTH interpolates vertex intensities across a polygon's surface or it calculates intensities per pixel.
FFP_FLAT rasterizes one color per polygon.
param
- the shade modelffpSmoothModel(int)
public void ffpSmoothModel(int param)
FFP_GOURAUD interpolates vertex intensities across a polygon's surface.
FFP_PHONG calculates intensities per pixel.
param
- the smooth modelpublic void ffpLightModeli(int property, int param)
property
- the light model propertyparam
- the parameter to set the property topublic void ffpLightModeliv(int property, int[] param)
property
- the light model propertyparam
- the parameters to set the property topublic void ffpLightModelfv(int property, float[] param)
property
- the light model propertyparam
- the parameters to set the property topublic void ffpEnableLight(int light)
light
- the id of the light in [0..FFP_MAX_LIGHTS]public void ffpDisableLight(int light)
light
- the id of the light in [0..FFP_MAX_LIGHTS]public boolean ffpIsLightEnabled(int light)
light
- the id of the light in [0..FFP_MAX_LIGHTS]public void ffpLightiv(int light, int property, int[] params)
light
- the id of the light in [0..FFP_MAX_LIGHTS]property
- the property of the light to setparams
- the parameters to set the property topublic void ffpLightf(int light, int property, float param)
light
- the id of the light in [0..FFP_MAX_LIGHTS]property
- the property of the light to setparam
- the parameter to set the property topublic void ffpLightfv(int light, int property, float[] params)
light
- the id of the light in [0..FFP_MAX_LIGHTS]property
- the property of the light to setparams
- the parameters to set the property topublic void ffpMateriali(int property, int param)
property
- the property of the material to setparam
- the parameter to set the property topublic void ffpMaterialf(int property, float param)
property
- the property of the material to setparam
- the parameter to set the property topublic void ffpMaterialiv(int property, int[] params)
property
- the property of the material to setparams
- the parameters to set the property topublic void ffpMaterialfv(int property, float[] params)
property
- the property of the material to setparams
- the parameters to set the property topublic void ffpColorMaterial(int mode)
mode
- the property of the current material to trackpublic void ffpBindTexture(int type, int id)
Note: A bound texture remains bound until this function is called again.
type
- which type to bind to. This can be either FFP_TEXTURE or FFP_DM_TEXTUREid
- the id of the texture to bind in [0..FFP_MAX_ALLOCATED_TEXTURES]public boolean ffpIsTexture(int id)
id
- the id of the texture in [0..FFP_MAX_ALLOCATED_TEXTURES]id
is nullpublic void ffpTexParameteri(int type, int property, int param)
type
- the type to modify. This can be either FFP_TEXTURE or FFP_DM_TEXTUREproperty
- the property to setparam
- the parameter to set the property topublic void ffpTexSubImage2D(int type, int xoffset, int yoffset, int width, int height, int[] data)
type
- the type to modify. This can be either FFP_TEXTURE or FFP_DM_TEXTURExoffset
- the x offset in the currently bound texture arrayyoffset
- the y offset in the currently bound texture arraywidth
- specifies the width of the texture sub-imageheight
- specifies the height of the texture sub-imagedata
- an integer array containing the image data in A8R8G8B8 formatpublic void ffpCopyTexSubImage2D(int type, int xoffset, int yoffset, int x, int y, int width, int height)
Note: Textures must have dimensions that are powers of two.
IMPORTANT: Due to the nature of a deferred renderer, calling this function before flushing the display can result in undefined behavior.
type
- the type to modify. This can be either FFP_TEXTURE or FFP_DM_TEXTURExoffset
- the x offset in the currently bound texture arrayyoffset
- the y offset in the currently bound texture arrayx
- the x window coordinate of the lower left corner of the rectangular region in the frame buffery
- the y window coordinate of the lower left corner of the rectangular region in the frame bufferwidth
- specifies the width of the rectangular region in the frame bufferheight
- specifies the height of the rectangular region in the frame bufferpublic void ffpTexImage2D(int type, int format, int[] data, int width, int height)
Note: Textures must have dimensions that are powers of two.
type
- the type to modify. This can be either FFP_TEXTURE or FFP_DM_TEXTUREformat
- the format of the image, either FFP_RGB or FFP_ARGB. FFP_ARGB textures have their colors blended to black based on their alpha channels.data
- an integer array containing the image data in A8R8G8B8 formatwidth
- the width, in pixels, of the textureheight
- the height, in pixels, of the texturepublic void ffpCopyTexImage2D(int type, int x, int y, int width, int height)
Note: Textures must have dimensions that are powers of two.
IMPORTANT: Due to the nature of a deferred renderer, calling this function before flushing the display can result in undefined behavior.
type
- the type to modify. This can be either FFP_TEXTURE or FFP_DM_TEXTUREx
- the x window coordinate of the lower left corner of the rectangular region in the frame buffery
- the y window coordinate of the lower left corner of the rectangular region in the frame bufferwidth
- the width, in pixels, of the region in the frame bufferheight
- the height, in pixels, of the region in the frame bufferpublic void ffpDeleteTexture(int id)
id
- the id of the texture in [0..FFP_MAX_ALLOCATED_TEXTURES]public void ffpDeleteAllTextures()
public void ffpPointSize(int size)
size
- the sizepublic void ffpPointSize(float size)
size
- the sizepublic void ffpFogColor(int red, int green, int blue)
red
- the value of the red channel in [0..255]green
- the value of the green channel in [0..255]blue
- the value of the blue channel in [0..255]public void ffpFogStart(float start)
Note: the start value must be less than the end value
start
- the start point in [0..1]public void ffpFogEnd(float end)
Note: the end value must be greater than the start value
end
- the end point in [0..1]public void ffpTexBlockFilterStart(float start)
Note: the start value must be less than the end value
start
- the start point in [0..1]public void ffpTexBlockFilterEnd(float end)
Note: the end value must be greater than the start value
end
- the end point in [0..1]public void ffpCoverageWritemask(int write)
The parameter can be either FFP_TRUE or FFP_FALSE.
write
- sets the Coverage buffer to writeable or notpublic boolean ffpCoverageBufferFilled()
public void ffpRenderToCoverageBuffer(int cov)
The parameter can be either FFP_TRUE or FFP_FALSE.
cov
- true when the subsequent draw functions only draw to the coverage buffer.public void ffpCoverageTest(int cov)
This allows for the drawing of things like a skybox.
The parameter can be either FFP_TRUE or FFP_FALSE.
cov
- true when the subsequent draw functions only draw pixels that are set in the coverage buffer.