本文整理汇总了Java中com.badlogic.gdx.graphics.GL20.GL_ONE属性的典型用法代码示例。如果您正苦于以下问题:Java GL20.GL_ONE属性的具体用法?Java GL20.GL_ONE怎么用?Java GL20.GL_ONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.badlogic.gdx.graphics.GL20
的用法示例。
在下文中一共展示了GL20.GL_ONE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Quad3D
/** A Quad3D that starts with blending enabled, and a common set of blend factors. */
public Quad3D (Blending blending) {
opaque = false;
switch (blending) {
case PremultipliedAlpha:
srcBlendFactor = GL20.GL_ONE;
dstBlendFactor = GL20.GL_ONE_MINUS_SRC_ALPHA;
break;
case Additive:
srcBlendFactor = dstBlendFactor = GL20.GL_ONE;
break;
case Alpha:
srcBlendFactor = GL20.GL_ALPHA;
dstBlendFactor = GL20.GL_ONE_MINUS_SRC_ALPHA;
break;
}
}
示例2: blend
/** Enables blending and sets the blend function parameters to a commonly used pair. Blending is disabled by default.
* @return This object for chaining. */
public Quad3D blend (Blending blending) {
opaque = false;
switch (blending) {
case Alpha:
srcBlendFactor = GL20.GL_SRC_ALPHA;
dstBlendFactor = GL20.GL_ONE_MINUS_SRC_ALPHA;
break;
case PremultipliedAlpha:
srcBlendFactor = GL20.GL_ONE;
dstBlendFactor = GL20.GL_ONE_MINUS_SRC_ALPHA;
break;
case Additive:
srcBlendFactor = dstBlendFactor = GL20.GL_ONE;
break;
}
return this;
}
示例3: applyDefaults
public void applyDefaults () {
blending = depthTesting = culling = false;
depthMasking = true;
depthRangeNear = 0f;
depthRangeFar = 1f;
cullFace = GL20.GL_BACK;
blendSrcFuncColor = blendSrcFuncAlpha = GL20.GL_ONE;
blendDstFuncColor = blendDstFuncAlpha = GL20.GL_ZERO;
blendEquationColor = blendEquationAlpha = GL20.GL_FUNC_ADD;
depthFunc = GL20.GL_LESS;
textureUnits.clear();
}