RenderState
Inheritance: java.lang.Object
All Implemented Interfaces: java.io.Closeable, java.lang.Comparable
public class RenderState implements Closeable, Comparable<RenderState>
用于构建管线的渲染状态,对渲染状态所做的更改不会影响已创建的管线实例。
构造函数
| 构造函数 | 描述 |
|---|---|
| RenderState() | 构造函数 RenderState |
方法
RenderState()
public RenderState()
构造函数 RenderState
close()
public void close()
释放 RenderState 并释放所有内部资源。
compareTo(RenderState other)
public int compareTo(RenderState other)
将渲染状态与另一个实例进行比较
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| other | RenderState | 另一个用于比较的渲染状态 |
Returns: int
equals(Object obj)
public boolean equals(Object obj)
返回一个值,指示此实例是否等于指定的对象。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| obj | java.lang.Object |
Returns: 布尔
getBlend()
public boolean getBlend()
启用或禁用片段混合。
Returns: boolean - 启用或禁用片段混合。
getBlendColor()
public FVector4 getBlendColor()
获取在 BlendFactor.CONSTANT_COLOR 中使用的混合颜色
Returns: FVector4 - the blend color where used in BlendFactor.CONSTANT_COLOR
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCullFace()
public boolean getCullFace()
启用或禁用剔除面
Returns: boolean - 启用或禁用剔除面
getCullFaceMode()
public int getCullFaceMode()
获取将被剔除的面。
Returns: int - 将被剔除的面。
getDepthFunction()
public CompareFunction getDepthFunction()
获取深度测试中使用的比较函数
Returns: CompareFunction - the compare function used in depth test
getDepthMask()
public boolean getDepthMask()
启用或禁用深度写入。
Returns: boolean - 启用或禁用深度写入。
getDepthTest()
public boolean getDepthTest()
启用或禁用深度测试。
Returns: boolean - 启用或禁用深度测试。
getDestinationBlendFactor()
public BlendFactor getDestinationBlendFactor()
获取颜色的混合方式。
Returns: BlendFactor - how the color is blended.
getFrontFace()
public FrontFace getFrontFace()
获取正面的顺序。
Returns: FrontFace - which order is front face.
getPolygonMode()
public PolygonMode getPolygonMode()
获取多边形的渲染模式。
Returns: PolygonMode - the polygon’s render mode.
getScissorTest()
public boolean getScissorTest()
启用或禁用剪刀测试
Returns: boolean - 启用或禁用剪裁测试
getSourceBlendFactor()
public BlendFactor getSourceBlendFactor()
获取颜色的混合方式。
Returns: BlendFactor - how the color is blended.
getStencilBackFace()
public StencilState getStencilBackFace()
获取背面模板状态。
Returns: StencilState - the stencil state for back face.
getStencilFrontFace()
public StencilState getStencilFrontFace()
获取正面模板状态。
Returns: StencilState - the stencil state for front face.
getStencilMask()
public int getStencilMask()
获取在测试完成时与参考值和存储的模板值进行 AND 运算的掩码。
Returns: int - 在测试完成时与参考值和存储的模板值进行 AND 运算的掩码。
getStencilReference()
public int getStencilReference()
获取模板测试的参考值。
Returns: int - 模板测试的参考值。
getStencilTest()
public boolean getStencilTest()
启用或禁用模板测试。
Returns: boolean - 启用或禁用模板测试。
hashCode()
public int hashCode()
返回此实例的哈希码。
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setBlend(boolean value)
public void setBlend(boolean value)
启用或禁用片段混合。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | 布尔 | 新值 |
setBlendColor(FVector4 value)
public void setBlendColor(FVector4 value)
设置在 BlendFactor.CONSTANT_COLOR 中使用的混合颜色
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | FVector4 | 新值 |
setCullFace(boolean value)
public void setCullFace(boolean value)
启用或禁用剔除面
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | 布尔 | 新值 |
setCullFaceMode(int value)
public void setCullFaceMode(int value)
设置将被剔除的面。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | int | 新值 |
setDepthFunction(CompareFunction value)
public void setDepthFunction(CompareFunction value)
设置深度测试中使用的比较函数
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | CompareFunction | 新值 |
setDepthMask(boolean value)
public void setDepthMask(boolean value)
启用或禁用深度写入。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | 布尔 | 新值 |
setDepthTest(boolean value)
public void setDepthTest(boolean value)
启用或禁用深度测试。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | 布尔 | 新值 |
setDestinationBlendFactor(BlendFactor value)
public void setDestinationBlendFactor(BlendFactor value)
设置颜色的混合方式。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | BlendFactor | 新值 |
setFrontFace(FrontFace value)
public void setFrontFace(FrontFace value)
设置正面的顺序。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | FrontFace | 新值 |
setPolygonMode(PolygonMode value)
public void setPolygonMode(PolygonMode value)
设置多边形的渲染模式。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | PolygonMode | 新值 |
setScissorTest(boolean value)
public void setScissorTest(boolean value)
启用或禁用剪刀测试
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | 布尔 | 新值 |
setSourceBlendFactor(BlendFactor value)
public void setSourceBlendFactor(BlendFactor value)
设置颜色的混合方式。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | BlendFactor | 新值 |
setStencilMask(int value)
public void setStencilMask(int value)
设置在测试完成时与参考值和存储的模板值进行 AND 运算的掩码。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | int | 新值 |
setStencilReference(int value)
public void setStencilReference(int value)
设置模板测试的参考值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | int | 新值 |
setStencilTest(boolean value)
public void setStencilTest(boolean value)
启用或禁用模板测试。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | 布尔 | 新值 |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| arg0 | long | |
| arg1 | int |