本文整理汇总了Java中com.badlogic.gdx.graphics.GL20.GL_SRC_ALPHA属性的典型用法代码示例。如果您正苦于以下问题:Java GL20.GL_SRC_ALPHA属性的具体用法?Java GL20.GL_SRC_ALPHA怎么用?Java GL20.GL_SRC_ALPHA使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.badlogic.gdx.graphics.GL20
的用法示例。
在下文中一共展示了GL20.GL_SRC_ALPHA属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: refresh
public void refresh () {
super.refresh();
z = 0;
rotation.set(0f, 0f, 0f, 1f);
opaque = true; // refresh most commonly used for on-the-fly batch.draw(), so default to mode that doesn't need sorting
srcBlendFactor = GL20.GL_SRC_ALPHA;
dstBlendFactor = GL20.GL_ONE_MINUS_SRC_ALPHA;
}