|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neovisionaries.android.opengl.StencilSettings
public class StencilSettings
Stencil settings.
// E X A M P L E newStencilSettings()
.setActionSet
( newStencilActionSet
(StencilAction.REPLACE
,StencilAction.DECR
,StencilAction.DECR
) ) .setComparator
( newStencilComparator
(StencilComparisonOperator.LESS
, 0x7, 0x3 ) ) .apply()
;
Constructor Summary | |
---|---|
StencilSettings()
|
Method Summary | |
---|---|
StencilSettings |
apply()
Apply the settings values that this instance holds to the underlying OpenGL ES implementation. |
StencilSettings |
disable()
Disable the stencil test. |
StencilSettings |
enable()
Enable the stencil test. |
StencilActionSet |
getBackActionSet()
Get the action set for the back face. |
StencilComparator |
getBackComparator()
Get the stencil comparator for the back face. |
StencilActionSet |
getFrontActionSet()
Get the action set for the front face. |
StencilComparator |
getFrontComparator()
Get the stencil comparator for the front face. |
StencilSettings |
setActionSet(StencilActionSet actionSet)
This method is an alias of setActionSet (actionSet, null). |
StencilSettings |
setActionSet(StencilActionSet actionSet,
Face face)
Set an action set for the specified face. |
StencilSettings |
setComparator(StencilComparator comparator)
This method is an alias of setComparator (comparator, null). |
StencilSettings |
setComparator(StencilComparator comparator,
Face face)
Set a stencil comparator for the specified face. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StencilSettings()
Method Detail |
---|
public StencilActionSet getFrontActionSet()
The default action set is an instance created by StencilActionSet()
.
public StencilActionSet getBackActionSet()
The default action set is an instance created by StencilActionSet()
.
public StencilSettings setActionSet(StencilActionSet actionSet)
setActionSet
(actionSet, null).
public StencilSettings setActionSet(StencilActionSet actionSet, Face face)
If the major version number of the underlying OpenGL ES implementation is less than 2 (OpenGL ES 1.1, for example), it is no use setting an action set for the back face. It is because glStencilOpSeparate is not available. In this case, an action set for the front face is used for both the front face and the back face.
actionSet
- An action set. The given action set is copied by using
the copy constructor of StencilActionSet
.face
- A face for which the action set is used. If null is given,
Face.FRONT_AND_BACK
is used, meaning that the
given action set is used for both the front face and
the back face.
public StencilComparator getFrontComparator()
The default stencil comparator is an instance created by
StencilComparator()
.
public StencilComparator getBackComparator()
The default stencil comparator is an instance created by
StencilComparator()
.
public StencilSettings setComparator(StencilComparator comparator)
setComparator
(comparator, null).
comparator
- A stencil comparator.
public StencilSettings setComparator(StencilComparator comparator, Face face)
If the major version number of the underlying OpenGL ES implementation is less than 2 (OpenGL ES 1.1, for example), it is no use setting a stencil comparator for the back face. It is because glStencilFuncSeparate is not available. In this case, a stencil comparator for the front face is used for both the front face and the back face.
comparator
- A stencil comparator. The given comparator is copied by
using the copy constructor of StencilComparator
.face
- A face for which the comparator is used. If null is given,
Face.FRONT_AND_BACK
is used, meaning that the given
comparator is used for both the front face and the back face.
public StencilSettings enable()
public StencilSettings disable()
public StencilSettings apply()
If the OpenGL ES version is equal to or greater than 2.0, methods listed below are executed.
enable()
Otherwise, the following two are executed.
enable()
enable()
,
glStencilFunc,
glStencilFuncSeparate,
glStencilOp,
glStencilOpSeparate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |