crystalspace.jbind.interfaces.ivideo.graph3d
Interface iGraphics3D

All Superinterfaces:
iBase, iPointer
All Known Implementing Classes:
csGraphics3D

public interface iGraphics3D
extends iBase

This is the standard 3D graphics interface. All 3D graphics rasterizer servers for Crystal Space should implement this interface, as well as the iGraphics2D interface. The standard implementation is csGraphics3DSoftware.

Author:
Java wrapper - Quentin Anciaux, c++ version - http://crystal.sourceforge.net/docs/online/devapi/structiGraphics3D.php

Method Summary
 boolean beginDraw(int DrawFlags)
          Start a new frame (see CSDRAW_XXX bit flags);.
 void clearCache()
          Clear the texture cache.
 void close()
          Close the 3D graphics display.
 void closeFogObject(int id)
          Close a volumetric fog object.
 void closePortal()
          Close a portal previously opened with OpenPortal();.
 iHalo createHalo(float iR, float iG, float iB, byte iAlpha, int iWidth, int iHeight)
          Create a halo of the specified color and return a handle.
 void createInterleavedRenderBuffers(int size, int type, int count, iRenderBuffer buffers)
          Create an interleaved renderbuffer (You would use this then set stride to determine offset and stride of the interleaved buffer.
 iRenderBuffer createRenderBuffer(int size, int type, int componentType, int componentCount, boolean index)
          Create a renderbuffer.
 void disableZOffset()
          Disables offsetting of Z values.
 void drawFogPolygon(int id, G3DPolygonDFP poly, int fogtype)
          Add a front or back-facing fog polygon in the current fog object.
 void drawLine(csVector3 v1, csVector3 v2, float fov, int color)
          Draw a line in camera space.
 void drawMesh(csRenderMesh mymesh)
          Drawroutine.
 void drawPixmap(iTextureHandle hTex, int sx, int sy, int sw, int sh, int tx, int ty, int tw, int th)
          Draw a pixmap using a rectangle from given texture.
 void drawPixmap(iTextureHandle hTex, int sx, int sy, int sw, int sh, int tx, int ty, int tw, int th, byte Alpha)
          Draw a pixmap using a rectangle from given texture.
 void drawPolygon(G3DPolygonDP poly)
          Draw the projected polygon with light and texture.
 void drawPolygonDebug(G3DPolygonDP poly)
          Draw the projected polygon with light and texture.
 void drawPolygonFX(G3DPolygonDPFX poly)
          Draw a polygon with special effects.
 void drawPolygonMesh(G3DPolygonMesh mesh)
          Draw a triangle mesh using features similar to DrawPolygon.
 void drawSimpleMesh(csSimpleRenderMesh mesh)
          Draw a csSimpleRenderMesh on the screen.
 void drawTriangleMesh(G3DTriangleMesh mesh)
          Draw a triangle mesh using features similar to DrawPolygonFX.
 void dumpCache()
          Dump the texture cache.
 void enableZOffset()
          Enables offsetting of Z values.
 void finishDraw()
          End the frame and do a page swap.
 csGraphics3DCaps getCaps()
          Get the current driver's capabilities.
 iClipper2D getClipper()
          Get clipper that was used.
 int getClipType()
          Return type of clipper.
 iGraphics2D getDriver2D()
          Get a pointer to our 2d canvas driver.
 int getHeight()
          Get drawing buffer height.
 csPlane3 getNearPlane()
          Get near clip plane.
 csReversibleTransform getObjectToCamera()
          Get object to camera transformation.
 float getPerspectiveAspect()
          Get aspect ratio.
 int[] getPerspectiveCenter()
          Get perspective center.
 long getRenderState(int op)
          Get a renderstate value.
 iTextureHandle getRenderTarget()
          Get the current render target (0 for screen);.
 iTextureManager getTextureManager()
          Get the texture manager: do NOT increment the refcount of texture manager.
 iVertexBufferManager getVertexBufferManager()
          Get the vertex buffer manager.
 int getWidth()
          Get drawing buffer width.
 boolean[] getWriteMask()
          Get the masking of color and/or alpha values to framebuffer.
 iPointer getZBuffAt(int x, int y)
          Debugging only: get a pointer to Z-buffer at some location.
 float getZBuffValue(int x, int y)
          Get Z-buffer value at given X,Y position.
 int getZMode()
          Get the z buffer write/test mode.
 boolean hasNearPlane()
          Return true if we have a near plane.
 boolean isLightmapOK(int lmw, int lmh, int lightCellSize)
          Check if renderer can handle a lightmap.
 boolean open()
          Open the 3D graphics display.
 void openFogObject(int id, csFog fog)
          Initiate a volumetric fog object.
 void openPortal(G3DPolygonDFP poly)
          Enter a new clipped portal.
 void print(csRect area)
          Print the image in backbuffer.
 void removeFromCache(iRendererLightmap rlm)
          Remove some polygon from the cache.
 void resetNearPlane()
          Reset near clip plane (i.e. disable it);.
 void setBufferState(int attribs, iRenderBuffer[] buffers, int count)
          Activate or deactivate all given buffers depending on the value of 'buffers' for that index.
 void setClipper(iClipper2D clipper, int cliptype)
          Set optional clipper to use.
 void setDimensions(int width, int height)
          Change the dimensions of the display.
 void setNearPlane(csPlane3 pl)
          Set near clip plane.
 void setObjectToCamera(csReversibleTransform o2c)
          Set object to camera transformation (currently only used by DrawTriangleMesh and DrawPolygonMesh);.
 void setPerspectiveAspect(float aspect)
          Set aspect ratio for perspective projection.
 void setPerspectiveCenter(int x, int y)
          Set center of projection for perspective projection.
 boolean setRenderState(int op, long val)
          Set a renderstate value.
 void setRenderTarget(iTextureHandle handle)
          Set the target of rendering.
 void setRenderTarget(iTextureHandle handle, boolean persisten)
          Set the target of rendering.
 void setShadowState(int state)
          Controls shadow drawing.
 void setTextureState(int units, iTextureHandle[] textures, int count)
          Activate or deactivate all given textures depending on the value of 'textures' for that unit (i.e. deactivate if 0);.
 void setWriteMask(boolean red, boolean green, boolean blue, boolean alpha)
          Set the masking of color and/or alpha values to framebuffer.
 void setZMode(int mode)
          Set the z buffer write/test mode.
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Method Detail

beginDraw

public boolean beginDraw(int DrawFlags)
Start a new frame (see CSDRAW_XXX bit flags);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
DrawFlags -
Returns:

clearCache

public void clearCache()
Clear the texture cache. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


close

public void close()
Close the 3D graphics display. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


closeFogObject

public void closeFogObject(int id)
Close a volumetric fog object. After the volumetric object is closed it should be rendered on screen (whether you do it here or in DrawFogPolygon is not important);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
id -

closePortal

public void closePortal()
Close a portal previously opened with OpenPortal();. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


createHalo

public iHalo createHalo(float iR,
                        float iG,
                        float iB,
                        byte iAlpha,
                        int iWidth,
                        int iHeight)
Create a halo of the specified color and return a handle. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
iR -
iG -
iB -
iAlpha -
iWidth -
iHeight -
Returns:

createInterleavedRenderBuffers

public void createInterleavedRenderBuffers(int size,
                                           int type,
                                           int count,
                                           iRenderBuffer buffers)
Create an interleaved renderbuffer (You would use this then set stride to determine offset and stride of the interleaved buffer. Parameters: size Size of the buffer in bytes count Number of renderbuffers you want Implemented in csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
size -
type -
count -
buffers -

createRenderBuffer

public iRenderBuffer createRenderBuffer(int size,
                                        int type,
                                        int componentType,
                                        int componentCount,
                                        boolean index)
Create a renderbuffer. Parameters: size Size of the buffer in bytes. type Type of buffer; CS_BUF_DYNAMIC or CS_BUF_STATIC componentType Components Types; CS_BUFCOMP_BYTE, CS_BUFCOMP_INT, etc componentCount Number of components per element (e.g. 4 for RGBA); index True if this buffer will contain indices. (Triangle buffer); Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


disableZOffset

public void disableZOffset()
Disables offsetting of Z values. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


drawFogPolygon

public void drawFogPolygon(int id,
                           G3DPolygonDFP poly,
                           int fogtype)
Add a front or back-facing fog polygon in the current fog object. Note that it is guaranteed that all back-facing fog polygons will have been added before the first front-facing polygon. fogtype can be: CS_FOG_FRONT: a front-facing polygon CS_FOG_BACK: a back-facing polygon CS_FOG_VIEW: the view-plane Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
id -
poly -
fogtype -

drawLine

public void drawLine(csVector3 v1,
                     csVector3 v2,
                     float fov,
                     int color)
Draw a line in camera space. Warning! This is a 2D operation and must be called while in BeginDraw(CSDRAW_2DGRAPHICS);! Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
v1 -
v2 -
fov -
color -

drawMesh

public void drawMesh(csRenderMesh mymesh)
Drawroutine. Only way to draw stuff. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
mymesh -

drawPixmap

public void drawPixmap(iTextureHandle hTex,
                       int sx,
                       int sy,
                       int sw,
                       int sh,
                       int tx,
                       int ty,
                       int tw,
                       int th)
Draw a pixmap using a rectangle from given texture. The sx,sy(sw,sh); rectangle defines the screen rectangle within which the drawing is performed (clipping rectangle is also taken into account);. The tx,ty(tw,th); rectangle defines a subrectangle from texture which should be painted. If the subrectangle exceeds the actual texture size, texture coordinates are wrapped around (e.g. the texture is tiled);. The Alpha parameter defines the transparency of the drawing operation, 0 means opaque, 255 means fully transparent. WARNING: Tiling works only with textures that have power-of-two sizes! That is, both width and height should be a power-of-two, although not neccessarily equal. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
hTex -
sx -
sy -
sw -
sh -
tx -
ty -
tw -
th -

drawPixmap

public void drawPixmap(iTextureHandle hTex,
                       int sx,
                       int sy,
                       int sw,
                       int sh,
                       int tx,
                       int ty,
                       int tw,
                       int th,
                       byte Alpha)
Draw a pixmap using a rectangle from given texture. The sx,sy(sw,sh); rectangle defines the screen rectangle within which the drawing is performed (clipping rectangle is also taken into account);. The tx,ty(tw,th); rectangle defines a subrectangle from texture which should be painted. If the subrectangle exceeds the actual texture size, texture coordinates are wrapped around (e.g. the texture is tiled);. The Alpha parameter defines the transparency of the drawing operation, 0 means opaque, 255 means fully transparent. WARNING: Tiling works only with textures that have power-of-two sizes! That is, both width and height should be a power-of-two, although not neccessarily equal. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
hTex -
sx -
sy -
sw -
sh -
tx -
ty -
tw -
th -
Alpha -

drawPolygon

public void drawPolygon(G3DPolygonDP poly)
Draw the projected polygon with light and texture. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
poly -

drawPolygonDebug

public void drawPolygonDebug(G3DPolygonDP poly)
Draw the projected polygon with light and texture. Debugging version. This one does not actually draw anything but it just prints debug information about what it would have done. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
poly -

drawPolygonFX

public void drawPolygonFX(G3DPolygonDPFX poly)
Draw a polygon with special effects. This is the most rich and slowest variant of DrawPolygonXxx. (If you use these features); Warning! Do not rely on this method to handle Color keying under all circumstances. Color Keying will only work reliable in Mixmodes FX_Copy, FX_Add and FX_Transparent. When using FX_Multiply and FX_Multiply2, it depends very much on the driver if it works or not. For example the RivaTNT Detonator 0.48 driver can display Multiply with color keying, while newer versions can't. They will then not display anything at all. It is always safer to use a texture where transparent sections are white or 50% gray if you want to achieve transparent sections in Multiply, Multiply2. There are also some drivers (which I would consider buggy...);, that won't display FX_Alpha correctly with Color Keying. I can't provide a valid workaround for that except using FX_Multiplay and FX_Add, to manually create the image, but that would be very expensive. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
poly -

drawPolygonMesh

public void drawPolygonMesh(G3DPolygonMesh mesh)
Draw a triangle mesh using features similar to DrawPolygon. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
mesh -

drawSimpleMesh

public void drawSimpleMesh(csSimpleRenderMesh mesh)
Draw a csSimpleRenderMesh on the screen. Simple render meshes are intended for cases where setting up a render mesh and juggling with render buffers would be too much effort - e.g. when you want to draw a single polygon on the screen. DrawSimpleMesh (); hides the complexity of csRenderMesh, it cares about setting up render buffers, activating the texture etc. Note that you can still provide shaders and shader variables, but those are optional. Implemented in csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
mesh -

drawTriangleMesh

public void drawTriangleMesh(G3DTriangleMesh mesh)
Draw a triangle mesh using features similar to DrawPolygonFX. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
mesh -

dumpCache

public void dumpCache()
Dump the texture cache. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


enableZOffset

public void enableZOffset()
Enables offsetting of Z values. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


finishDraw

public void finishDraw()
End the frame and do a page swap. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


getCaps

public csGraphics3DCaps getCaps()
Get the current driver's capabilities. Each driver implements their own function. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getClipper

public iClipper2D getClipper()
Get clipper that was used. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getClipType

public int getClipType()
Return type of clipper. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getDriver2D

public iGraphics2D getDriver2D()
Get a pointer to our 2d canvas driver. NOTE: It's not increfed, and therefore it shouldn't be decref-ed by caller. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getHeight

public int getHeight()
Get drawing buffer height. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getNearPlane

public csPlane3 getNearPlane()
Get near clip plane. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getObjectToCamera

public csReversibleTransform getObjectToCamera()
Get object to camera transformation. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getPerspectiveAspect

public float getPerspectiveAspect()
Get aspect ratio. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getPerspectiveCenter

public int[] getPerspectiveCenter()
Get perspective center. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getRenderState

public long getRenderState(int op)
Get a renderstate value. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
op -
Returns:

getRenderTarget

public iTextureHandle getRenderTarget()
Get the current render target (0 for screen);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getTextureManager

public iTextureManager getTextureManager()
Get the texture manager: do NOT increment the refcount of texture manager. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon. Referenced by csHwrBitmap::csHwrBitmap();.

Returns:

getVertexBufferManager

public iVertexBufferManager getVertexBufferManager()
Get the vertex buffer manager. This will not increment the ref count of the vertex buffer manager! Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getWidth

public int getWidth()
Get drawing buffer width. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getWriteMask

public boolean[] getWriteMask()
Get the masking of color and/or alpha values to framebuffer. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

getZBuffAt

public iPointer getZBuffAt(int x,
                           int y)
Debugging only: get a pointer to Z-buffer at some location. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
x -
y -
Returns:

getZBuffValue

public float getZBuffValue(int x,
                           int y)
Get Z-buffer value at given X,Y position. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
x -
y -
Returns:

getZMode

public int getZMode()
Get the z buffer write/test mode. Implemented in csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

hasNearPlane

public boolean hasNearPlane()
Return true if we have a near plane. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Returns:

isLightmapOK

public boolean isLightmapOK(int lmw,
                            int lmh,
                            int lightCellSize)
Check if renderer can handle a lightmap. Returns true if it can, false if not. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
lmw -
lmh -
lightCellSize -
Returns:

open

public boolean open()
Open the 3D graphics display. Implemented in csSoftwareGraphics3DCommon, csSoftwareGraphics3D, csGraphics3DNull, csGraphics3DSoftwareCommon, and csGraphics3DSoftware.

Returns:

openFogObject

public void openFogObject(int id,
                          csFog fog)
Initiate a volumetric fog object. This function will be called before front-facing and back-facing fog polygons are added to the object. The fog object will be convex but not necesarily closed. The given CS_ID can be used to identify multiple fog objects when multiple objects are started. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
id -
fog -

openPortal

public void openPortal(G3DPolygonDFP poly)
Enter a new clipped portal. Basically this routine will restrict all further drawing to the given 2D area and it will also respect the current contents of the Z-buffer so that geometry will only render where the Z-buffer allows it (even if zfill or znone is used);. Remember to close a portal later using ClosePortal();. Basically this represents a stacked layer of portals. Each subsequent portal must be fully contained in the previous ones. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
poly -

print

public void print(csRect area)
Print the image in backbuffer. The area parameter is only a hint to the renderer. Changes outside the rectangle may or may not be printed as well. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
area -

removeFromCache

public void removeFromCache(iRendererLightmap rlm)
Remove some polygon from the cache. You have to call this function before deleting a polygon (csPolygon3D destructor will do that);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
rlm -

resetNearPlane

public void resetNearPlane()
Reset near clip plane (i.e. disable it);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.


setBufferState

public void setBufferState(int attribs,
                           iRenderBuffer[] buffers,
                           int count)
Activate or deactivate all given buffers depending on the value of 'buffers' for that index. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
attribs -
buffers -
count -

setClipper

public void setClipper(iClipper2D clipper,
                       int cliptype)
Set optional clipper to use. If clipper == null then there is no clipper. Currently only used by DrawTriangleMesh. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
clipper -
cliptype -

setDimensions

public void setDimensions(int width,
                          int height)
Change the dimensions of the display. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
width -
height -

setNearPlane

public void setNearPlane(csPlane3 pl)
Set near clip plane. Currently only used by DrawTriangleMesh. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
pl -

setObjectToCamera

public void setObjectToCamera(csReversibleTransform o2c)
Set object to camera transformation (currently only used by DrawTriangleMesh and DrawPolygonMesh);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
o2c -

setPerspectiveAspect

public void setPerspectiveAspect(float aspect)
Set aspect ratio for perspective projection. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
aspect -

setPerspectiveCenter

public void setPerspectiveCenter(int x,
                                 int y)
Set center of projection for perspective projection. Center is set in screen space coordinates. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
x -
y -

setRenderState

public boolean setRenderState(int op,
                              long val)
Set a renderstate value. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
op -
val -
Returns:

setRenderTarget

public void setRenderTarget(iTextureHandle handle)
Set the target of rendering. If this is 0 then the target will be the main screen. Otherwise it is a texture. After calling g3d->FinishDraw(); the target will automatically be reset to 0 (main screen);. Note that on some implementions rendering on a texture will overwrite the screen. So you should only do this BEFORE you start rendering your frame. If 'persistent' is true then the current contents of the texture will be copied on screen before drawing occurs (in the first call to BeginDraw);. Otherwise it is assumed that you fully render the texture. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
handle -

setRenderTarget

public void setRenderTarget(iTextureHandle handle,
                            boolean persisten)
Set the target of rendering. If this is 0 then the target will be the main screen. Otherwise it is a texture. After calling g3d->FinishDraw(); the target will automatically be reset to 0 (main screen);. Note that on some implementions rendering on a texture will overwrite the screen. So you should only do this BEFORE you start rendering your frame. If 'persistent' is true then the current contents of the texture will be copied on screen before drawing occurs (in the first call to BeginDraw);. Otherwise it is assumed that you fully render the texture. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
handle -
persisten -

setShadowState

public void setShadowState(int state)
Controls shadow drawing. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
state -

setTextureState

public void setTextureState(int units,
                            iTextureHandle[] textures,
                            int count)
Activate or deactivate all given textures depending on the value of 'textures' for that unit (i.e. deactivate if 0);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
units -
textures -
count -

setWriteMask

public void setWriteMask(boolean red,
                         boolean green,
                         boolean blue,
                         boolean alpha)
Set the masking of color and/or alpha values to framebuffer. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
red -
green -
blue -
alpha -

setZMode

public void setZMode(int mode)
Set the z buffer write/test mode. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Parameters:
mode -