crystalspace.jbind.impl.video.graph3d
Class csGraphics3D

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.video.graph3d.csGraphics3D
All Implemented Interfaces:
iBase, iGraphics3D, iPointer

public class csGraphics3D
extends csBase
implements iGraphics3D

Author:
qan To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csGraphics3D(iPointer nPointer)
           
 
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.
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 java.lang.String getName()
          Return the name of the interface
 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.
 int getVersion()
          Return the version of the interface
 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.
static void initSCF()
           
 boolean isLightmapOK(int lmw, int lmh, int lightCellSize)
          Check if renderer can handle a lightmap.
protected  boolean isNativePointerValidSafe()
           
 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 class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, isNativePointerValidSafe, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csGraphics3D

public csGraphics3D(iPointer nPointer)
Parameters:
nPointer -
Method Detail

isNativePointerValidSafe

protected boolean isNativePointerValidSafe()

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase

initSCF

public static void initSCF()

getTextureManager

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

Specified by:
getTextureManager in interface iGraphics3D
Returns:

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

getDriver2D

public iGraphics2D getDriver2D()
Description copied from interface: iGraphics3D
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.

Specified by:
getDriver2D in interface iGraphics3D
Returns:

beginDraw

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

Specified by:
beginDraw in interface iGraphics3D
Parameters:
DrawFlags -
Returns:

finishDraw

public void finishDraw()
Description copied from interface: iGraphics3D
End the frame and do a page swap. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
finishDraw in interface iGraphics3D

print

public void print(csRect area)
Description copied from interface: iGraphics3D
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.

Specified by:
print in interface iGraphics3D
Parameters:
area -

clearCache

public void clearCache()
Description copied from interface: iGraphics3D
Clear the texture cache. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
clearCache in interface iGraphics3D
See Also:
iGraphics3D.clearCache()

close

public void close()
Description copied from interface: iGraphics3D
Close the 3D graphics display. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
close in interface iGraphics3D
See Also:
iGraphics3D.close()

closeFogObject

public void closeFogObject(int id)
Description copied from interface: iGraphics3D
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.

Specified by:
closeFogObject in interface iGraphics3D
Parameters:
id -
See Also:
iGraphics3D.closeFogObject(int)

closePortal

public void closePortal()
Description copied from interface: iGraphics3D
Close a portal previously opened with OpenPortal();. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
closePortal in interface iGraphics3D
See Also:
iGraphics3D.closePortal()

createHalo

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

Specified by:
createHalo in interface iGraphics3D
Parameters:
iR -
iG -
iB -
iAlpha -
iWidth -
iHeight -
Returns:
See Also:
iGraphics3D.createHalo(float, float, float, byte, int, int)

createInterleavedRenderBuffers

public void createInterleavedRenderBuffers(int size,
                                           int type,
                                           int count,
                                           iRenderBuffer buffers)
Description copied from interface: iGraphics3D
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.

Specified by:
createInterleavedRenderBuffers in interface iGraphics3D
Parameters:
size -
type -
count -
buffers -
See Also:
iGraphics3D.createInterleavedRenderBuffers(int, int, int, crystalspace.jbind.interfaces.ivideo.rndbuf.iRenderBuffer)

createRenderBuffer

public iRenderBuffer createRenderBuffer(int size,
                                        int type,
                                        int componentType,
                                        int componentCount,
                                        boolean index)
Description copied from interface: iGraphics3D
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.

Specified by:
createRenderBuffer in interface iGraphics3D
See Also:
iGraphics3D.createRenderBuffer(int, int, int, int, boolean)

disableZOffset

public void disableZOffset()
Description copied from interface: iGraphics3D
Disables offsetting of Z values. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
disableZOffset in interface iGraphics3D
See Also:
iGraphics3D.disableZOffset()

drawFogPolygon

public void drawFogPolygon(int id,
                           G3DPolygonDFP poly,
                           int fogtype)
Description copied from interface: iGraphics3D
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.

Specified by:
drawFogPolygon in interface iGraphics3D
Parameters:
id -
poly -
fogtype -
See Also:
iGraphics3D.drawFogPolygon(int, crystalspace.jbind.impl.video.graph3d.G3DPolygonDFP, int)

drawLine

public void drawLine(csVector3 v1,
                     csVector3 v2,
                     float fov,
                     int color)
Description copied from interface: iGraphics3D
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.

Specified by:
drawLine in interface iGraphics3D
Parameters:
v1 -
v2 -
fov -
color -
See Also:
iGraphics3D.drawLine(crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3, float, int)

drawMesh

public void drawMesh(csRenderMesh mymesh)
Description copied from interface: iGraphics3D
Drawroutine. Only way to draw stuff. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
drawMesh in interface iGraphics3D
Parameters:
mymesh -
See Also:
iGraphics3D.drawMesh(crystalspace.jbind.impl.video.rendermesh.csRenderMesh)

drawPixmap

public void drawPixmap(iTextureHandle hTex,
                       int sx,
                       int sy,
                       int sw,
                       int sh,
                       int tx,
                       int ty,
                       int tw,
                       int th,
                       byte Alpha)
Description copied from interface: iGraphics3D
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.

Specified by:
drawPixmap in interface iGraphics3D
Parameters:
hTex -
sx -
sy -
sw -
sh -
tx -
ty -
tw -
th -
Alpha -
See Also:
iGraphics3D.drawPixmap(crystalspace.jbind.interfaces.ivideo.texture.iTextureHandle, int, int, int, int, int, int, int, int, byte)

drawPixmap

public void drawPixmap(iTextureHandle hTex,
                       int sx,
                       int sy,
                       int sw,
                       int sh,
                       int tx,
                       int ty,
                       int tw,
                       int th)
Description copied from interface: iGraphics3D
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.

Specified by:
drawPixmap in interface iGraphics3D
Parameters:
hTex -
sx -
sy -
sw -
sh -
tx -
ty -
tw -
th -
See Also:
iGraphics3D.drawPixmap(crystalspace.jbind.interfaces.ivideo.texture.iTextureHandle, int, int, int, int, int, int, int, int)

drawPolygon

public void drawPolygon(G3DPolygonDP poly)
Description copied from interface: iGraphics3D
Draw the projected polygon with light and texture. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
drawPolygon in interface iGraphics3D
Parameters:
poly -
See Also:
iGraphics3D.drawPolygon(crystalspace.jbind.impl.video.graph3d.G3DPolygonDP)

drawPolygonDebug

public void drawPolygonDebug(G3DPolygonDP poly)
Description copied from interface: iGraphics3D
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.

Specified by:
drawPolygonDebug in interface iGraphics3D
Parameters:
poly -
See Also:
iGraphics3D.drawPolygonDebug(crystalspace.jbind.impl.video.graph3d.G3DPolygonDP)

drawPolygonFX

public void drawPolygonFX(G3DPolygonDPFX poly)
Description copied from interface: iGraphics3D
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.

Specified by:
drawPolygonFX in interface iGraphics3D
Parameters:
poly -
See Also:
iGraphics3D.drawPolygonFX(crystalspace.jbind.impl.video.graph3d.G3DPolygonDPFX)

drawPolygonMesh

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

Specified by:
drawPolygonMesh in interface iGraphics3D
Parameters:
mesh -
See Also:
iGraphics3D.drawPolygonMesh(crystalspace.jbind.impl.video.graph3d.G3DPolygonMesh)

drawSimpleMesh

public void drawSimpleMesh(csSimpleRenderMesh mesh)
Description copied from interface: iGraphics3D
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.

Specified by:
drawSimpleMesh in interface iGraphics3D
Parameters:
mesh -
See Also:
iGraphics3D.drawSimpleMesh(crystalspace.jbind.impl.video.graph3d.csSimpleRenderMesh)

drawTriangleMesh

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

Specified by:
drawTriangleMesh in interface iGraphics3D
Parameters:
mesh -
See Also:
iGraphics3D.drawTriangleMesh(crystalspace.jbind.impl.video.graph3d.G3DTriangleMesh)

dumpCache

public void dumpCache()
Description copied from interface: iGraphics3D
Dump the texture cache. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
dumpCache in interface iGraphics3D
See Also:
iGraphics3D.dumpCache()

enableZOffset

public void enableZOffset()
Description copied from interface: iGraphics3D
Enables offsetting of Z values. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
enableZOffset in interface iGraphics3D
See Also:
iGraphics3D.enableZOffset()

getCaps

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

Specified by:
getCaps in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getCaps()

getClipper

public iClipper2D getClipper()
Description copied from interface: iGraphics3D
Get clipper that was used. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getClipper in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getClipper()

getClipType

public int getClipType()
Description copied from interface: iGraphics3D
Return type of clipper. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getClipType in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getClipType()

getHeight

public int getHeight()
Description copied from interface: iGraphics3D
Get drawing buffer height. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getHeight in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getHeight()

getNearPlane

public csPlane3 getNearPlane()
Description copied from interface: iGraphics3D
Get near clip plane. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getNearPlane in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getNearPlane()

getObjectToCamera

public csReversibleTransform getObjectToCamera()
Description copied from interface: iGraphics3D
Get object to camera transformation. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getObjectToCamera in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getObjectToCamera()

getPerspectiveAspect

public float getPerspectiveAspect()
Description copied from interface: iGraphics3D
Get aspect ratio. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getPerspectiveAspect in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getPerspectiveAspect()

getPerspectiveCenter

public int[] getPerspectiveCenter()
Description copied from interface: iGraphics3D
Get perspective center. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getPerspectiveCenter in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getPerspectiveCenter()

getRenderState

public long getRenderState(int op)
Description copied from interface: iGraphics3D
Get a renderstate value. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getRenderState in interface iGraphics3D
Parameters:
op -
Returns:
See Also:
iGraphics3D.getRenderState(int)

getRenderTarget

public iTextureHandle getRenderTarget()
Description copied from interface: iGraphics3D
Get the current render target (0 for screen);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getRenderTarget in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getRenderTarget()

getVertexBufferManager

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

Specified by:
getVertexBufferManager in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getVertexBufferManager()

getWidth

public int getWidth()
Description copied from interface: iGraphics3D
Get drawing buffer width. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getWidth in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getWidth()

getWriteMask

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

Specified by:
getWriteMask in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getWriteMask()

getZBuffAt

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

Specified by:
getZBuffAt in interface iGraphics3D
Parameters:
x -
y -
Returns:
See Also:
iGraphics3D.getZBuffAt(int, int)

getZBuffValue

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

Specified by:
getZBuffValue in interface iGraphics3D
Parameters:
x -
y -
Returns:
See Also:
iGraphics3D.getZBuffValue(int, int)

getZMode

public int getZMode()
Description copied from interface: iGraphics3D
Get the z buffer write/test mode. Implemented in csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
getZMode in interface iGraphics3D
Returns:
See Also:
iGraphics3D.getZMode()

hasNearPlane

public boolean hasNearPlane()
Description copied from interface: iGraphics3D
Return true if we have a near plane. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
hasNearPlane in interface iGraphics3D
Returns:
See Also:
iGraphics3D.hasNearPlane()

isLightmapOK

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

Specified by:
isLightmapOK in interface iGraphics3D
Parameters:
lmw -
lmh -
lightCellSize -
Returns:
See Also:
iGraphics3D.isLightmapOK(int, int, int)

open

public boolean open()
Description copied from interface: iGraphics3D
Open the 3D graphics display. Implemented in csSoftwareGraphics3DCommon, csSoftwareGraphics3D, csGraphics3DNull, csGraphics3DSoftwareCommon, and csGraphics3DSoftware.

Specified by:
open in interface iGraphics3D
Returns:
See Also:
iGraphics3D.open()

openFogObject

public void openFogObject(int id,
                          csFog fog)
Description copied from interface: iGraphics3D
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.

Specified by:
openFogObject in interface iGraphics3D
Parameters:
id -
fog -
See Also:
iGraphics3D.openFogObject(int, crystalspace.jbind.impl.video.graph3d.csFog)

openPortal

public void openPortal(G3DPolygonDFP poly)
Description copied from interface: iGraphics3D
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.

Specified by:
openPortal in interface iGraphics3D
Parameters:
poly -
See Also:
iGraphics3D.openPortal(crystalspace.jbind.impl.video.graph3d.G3DPolygonDFP)

removeFromCache

public void removeFromCache(iRendererLightmap rlm)
Description copied from interface: iGraphics3D
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.

Specified by:
removeFromCache in interface iGraphics3D
Parameters:
rlm -
See Also:
iGraphics3D.removeFromCache(crystalspace.jbind.interfaces.ivideo.txtmgr.iRendererLightmap)

resetNearPlane

public void resetNearPlane()
Description copied from interface: iGraphics3D
Reset near clip plane (i.e. disable it);. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
resetNearPlane in interface iGraphics3D
See Also:
iGraphics3D.resetNearPlane()

setBufferState

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

Specified by:
setBufferState in interface iGraphics3D
Parameters:
attribs -
buffers -
count -
See Also:
iGraphics3D.setBufferState(int, crystalspace.jbind.interfaces.ivideo.rndbuf.iRenderBuffer[], int)

setClipper

public void setClipper(iClipper2D clipper,
                       int cliptype)
Description copied from interface: iGraphics3D
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.

Specified by:
setClipper in interface iGraphics3D
Parameters:
clipper -
cliptype -
See Also:
iGraphics3D.setClipper(crystalspace.jbind.interfaces.igeom.clip2d.iClipper2D, int)

setDimensions

public void setDimensions(int width,
                          int height)
Description copied from interface: iGraphics3D
Change the dimensions of the display. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
setDimensions in interface iGraphics3D
Parameters:
width -
height -
See Also:
iGraphics3D.setDimensions(int, int)

setNearPlane

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

Specified by:
setNearPlane in interface iGraphics3D
Parameters:
pl -
See Also:
iGraphics3D.setNearPlane(crystalspace.jbind.impl.csgeom.plane3.csPlane3)

setObjectToCamera

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

Specified by:
setObjectToCamera in interface iGraphics3D
Parameters:
o2c -
See Also:
iGraphics3D.setObjectToCamera(crystalspace.jbind.impl.csgeom.transfrm.csReversibleTransform)

setPerspectiveAspect

public void setPerspectiveAspect(float aspect)
Description copied from interface: iGraphics3D
Set aspect ratio for perspective projection. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
setPerspectiveAspect in interface iGraphics3D
Parameters:
aspect -
See Also:
iGraphics3D.setPerspectiveAspect(float)

setPerspectiveCenter

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

Specified by:
setPerspectiveCenter in interface iGraphics3D
Parameters:
x -
y -
See Also:
iGraphics3D.setPerspectiveCenter(int, int)

setRenderState

public boolean setRenderState(int op,
                              long val)
Description copied from interface: iGraphics3D
Set a renderstate value. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
setRenderState in interface iGraphics3D
Parameters:
op -
val -
Returns:
See Also:
iGraphics3D.setRenderState(int, long)

setRenderTarget

public void setRenderTarget(iTextureHandle handle,
                            boolean persisten)
Description copied from interface: iGraphics3D
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.

Specified by:
setRenderTarget in interface iGraphics3D
Parameters:
handle -
persisten -
See Also:
iGraphics3D.setRenderTarget(crystalspace.jbind.interfaces.ivideo.texture.iTextureHandle, boolean)

setRenderTarget

public void setRenderTarget(iTextureHandle handle)
Description copied from interface: iGraphics3D
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.

Specified by:
setRenderTarget in interface iGraphics3D
Parameters:
handle -
See Also:
iGraphics3D.setRenderTarget(crystalspace.jbind.interfaces.ivideo.texture.iTextureHandle)

setShadowState

public void setShadowState(int state)
Description copied from interface: iGraphics3D
Controls shadow drawing. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
setShadowState in interface iGraphics3D
Parameters:
state -
See Also:
iGraphics3D.setShadowState(int)

setTextureState

public void setTextureState(int units,
                            iTextureHandle[] textures,
                            int count)
Description copied from interface: iGraphics3D
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.

Specified by:
setTextureState in interface iGraphics3D
Parameters:
units -
textures -
count -
See Also:
iGraphics3D.setTextureState(int, crystalspace.jbind.interfaces.ivideo.texture.iTextureHandle[], int)

setWriteMask

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

Specified by:
setWriteMask in interface iGraphics3D
Parameters:
red -
green -
blue -
alpha -
See Also:
iGraphics3D.setWriteMask(boolean, boolean, boolean, boolean)

setZMode

public void setZMode(int mode)
Description copied from interface: iGraphics3D
Set the z buffer write/test mode. Implemented in csSoftwareGraphics3DCommon, csGraphics3DNull, csGraphics3DOGLCommon, and csGraphics3DSoftwareCommon.

Specified by:
setZMode in interface iGraphics3D
Parameters:
mode -
See Also:
iGraphics3D.setZMode(int)