BenQ Mobile

javax.microedition.m3g
Class CompositingMode

java.lang.Object
  extended byjavax.microedition.m3g.Object3D
      extended byjavax.microedition.m3g.CompositingMode

public class CompositingMode
extends Object3D

An Appearance component encapsulating per-pixel compositing attributes.


Field Summary
static int ALPHA
          Selects the alpha blend mode.
static int ALPHA_ADD
          Selects the additive blend mode.
static int MODULATE
          Selects the basic modulating blending mode; source pixels are multiplied with the destination pixels.
static int MODULATE_X2
          Selects the brighter modulating blending mode.
static int REPLACE
          Selects the replace mode.
 
Constructor Summary
CompositingMode()
          Constructs a CompositingMode object with default values.
 
Method Summary
 float getAlphaThreshold()
          Retrieves the current alpha testing threshold.
 int getBlending()
          Retrieves the current frame buffer blending mode.
 float getDepthOffsetFactor()
          Retrieves the current depth offset slope factor.
 float getDepthOffsetUnits()
          Retrieves the current constant depth offset.
 boolean isAlphaWriteEnabled()
          Queries whether alpha writing is enabled.
 boolean isColorWriteEnabled()
          Queries whether color writing is enabled.
 boolean isDepthTestEnabled()
          Queries whether depth testing is enabled.
 boolean isDepthWriteEnabled()
          Queries whether depth writing is enabled.
 void setAlphaThreshold(float threshold)
          Sets the threshold value for alpha testing.
 void setAlphaWriteEnable(boolean enable)
          Enables or disables writing of fragment alpha values into the color buffer.
 void setBlending(int mode)
          Selects a method of combining the pixel to be rendered with the pixel already in the frame buffer.
 void setColorWriteEnable(boolean enable)
          Enables or disables writing of fragment color values into the color buffer.
 void setDepthOffset(float factor, float units)
          Defines a value that is added to the screen space Z coordinate of a pixel immediately before depth test and depth write.
 void setDepthTestEnable(boolean enable)
          Enables or disables depth testing.
 void setDepthWriteEnable(boolean enable)
          Enables or disables writing of fragment depth values into the depth buffer.
 
Methods inherited from class javax.microedition.m3g.Object3D
addAnimationTrack, animate, duplicate, find, getAnimationTrack, getAnimationTrackCount, getReferences, getUserID, getUserObject, removeAnimationTrack, setUserID, setUserObject
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALPHA

public static final int ALPHA
Selects the alpha blend mode.

See Also:
Constant Field Values

ALPHA_ADD

public static final int ALPHA_ADD
Selects the additive blend mode.

See Also:
Constant Field Values

MODULATE

public static final int MODULATE
Selects the basic modulating blending mode; source pixels are multiplied with the destination pixels.

See Also:
Constant Field Values

MODULATE_X2

public static final int MODULATE_X2
Selects the brighter modulating blending mode.

See Also:
Constant Field Values

REPLACE

public static final int REPLACE
Selects the replace mode.

See Also:
Constant Field Values
Constructor Detail

CompositingMode

public CompositingMode()
Constructs a CompositingMode object with default values.

Method Detail

setBlending

public void setBlending(int mode)
Selects a method of combining the pixel to be rendered with the pixel already in the frame buffer.


getBlending

public int getBlending()
Retrieves the current frame buffer blending mode.


setAlphaThreshold

public void setAlphaThreshold(float threshold)
Sets the threshold value for alpha testing.


getAlphaThreshold

public float getAlphaThreshold()
Retrieves the current alpha testing threshold.


setAlphaWriteEnable

public void setAlphaWriteEnable(boolean enable)
Enables or disables writing of fragment alpha values into the color buffer.


isAlphaWriteEnabled

public boolean isAlphaWriteEnabled()
Queries whether alpha writing is enabled.


setColorWriteEnable

public void setColorWriteEnable(boolean enable)
Enables or disables writing of fragment color values into the color buffer.


isColorWriteEnabled

public boolean isColorWriteEnabled()
Queries whether color writing is enabled.


setDepthWriteEnable

public void setDepthWriteEnable(boolean enable)
Enables or disables writing of fragment depth values into the depth buffer.


isDepthWriteEnabled

public boolean isDepthWriteEnabled()
Queries whether depth writing is enabled.


setDepthTestEnable

public void setDepthTestEnable(boolean enable)
Enables or disables depth testing.


isDepthTestEnabled

public boolean isDepthTestEnabled()
Queries whether depth testing is enabled.


setDepthOffset

public void setDepthOffset(float factor,
                           float units)
Defines a value that is added to the screen space Z coordinate of a pixel immediately before depth test and depth write.


getDepthOffsetFactor

public float getDepthOffsetFactor()
Retrieves the current depth offset slope factor.


getDepthOffsetUnits

public float getDepthOffsetUnits()
Retrieves the current constant depth offset.


BenQ Mobile

Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner.
All Rights Reserved.
BenQ Corp. is a trademark licensee of Siemens AG.


For further information about Mobility Toolkit (MTK) visit our Developer Portal.