Java Code Examples for net.minecraft.client.renderer.GlStateManager#colorLogicOp()

The following examples show how to use net.minecraft.client.renderer.GlStateManager#colorLogicOp() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WrapperGlStateManager.java    From ClientBase with MIT License 4 votes vote down vote up
public static void colorLogicOp(int var0) {
    GlStateManager.colorLogicOp(var0);
}
 
Example 2
Source File: GuiVertTextField.java    From pycode-minecraft with MIT License 4 votes vote down vote up
/**
 * Draws the current selection and a vertical line cursor in the text box.
 */
private void drawCursorVertical(int startX, int startY, int endX, int endY)
{
    if (startX < endX)
    {
        int i = startX;
        startX = endX;
        endX = i;
    }

    if (startY < endY)
    {
        int j = startY;
        startY = endY;
        endY = j;
    }

    if (endX > this.xPosition + this.width)
    {
        endX = this.xPosition + this.width;
    }

    if (startX > this.xPosition + this.width)
    {
        startX = this.xPosition + this.width;
    }

    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    GlStateManager.color(0.0F, 0.0F, 255.0F, 255.0F);
    GlStateManager.disableTexture2D();
    GlStateManager.enableColorLogic();
    GlStateManager.colorLogicOp(GlStateManager.LogicOp.OR_REVERSE);
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION);
    vertexbuffer.pos((double)startX, (double)endY, 0.0D).endVertex();
    vertexbuffer.pos((double)endX, (double)endY, 0.0D).endVertex();
    vertexbuffer.pos((double)endX, (double)startY, 0.0D).endVertex();
    vertexbuffer.pos((double)startX, (double)startY, 0.0D).endVertex();
    tessellator.draw();
    GlStateManager.disableColorLogic();
    GlStateManager.enableTexture2D();
}