当前位置: 首页>>代码示例>>Java>>正文


Java GlStateManager.enableColorLogic方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.enableColorLogic方法的典型用法代码示例。如果您正苦于以下问题:Java GlStateManager.enableColorLogic方法的具体用法?Java GlStateManager.enableColorLogic怎么用?Java GlStateManager.enableColorLogic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.GlStateManager的用法示例。


在下文中一共展示了GlStateManager.enableColorLogic方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawCursorVertical

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * 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 > xPosition + width)
		endX = xPosition + width;
	
	if(startX > xPosition + width)
		startX = xPosition + width;
	
	Tessellator tessellator = Tessellator.getInstance();
	BufferBuilder bufferbuilder = tessellator.getBuffer();
	GlStateManager.color(0.0F, 0.0F, 255.0F, 255.0F);
	GlStateManager.disableTexture2D();
	GlStateManager.enableColorLogic();
	GlStateManager.colorLogicOp(GlStateManager.LogicOp.OR_REVERSE);
	bufferbuilder.begin(7, DefaultVertexFormats.POSITION);
	bufferbuilder.pos(startX, endY, 0.0D).endVertex();
	bufferbuilder.pos(endX, endY, 0.0D).endVertex();
	bufferbuilder.pos(endX, startY, 0.0D).endVertex();
	bufferbuilder.pos(startX, startY, 0.0D).endVertex();
	tessellator.draw();
	GlStateManager.disableColorLogic();
	GlStateManager.enableTexture2D();
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12-OF,代码行数:41,代码来源:PasswordField.java

示例2: drawSelectionBox

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Draws the blue selection box.
 */
private void drawSelectionBox(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.x + this.width) {
		endX = this.x + this.width;
	}

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

	Tessellator tessellator = Tessellator.getInstance();
	BufferBuilder bufferbuilder = tessellator.getBuffer();
	GlStateManager.color(0.0F, 0.0F, 255.0F, 255.0F);
	GlStateManager.disableTexture2D();
	GlStateManager.enableColorLogic();
	GlStateManager.colorLogicOp(GlStateManager.LogicOp.OR_REVERSE);
	bufferbuilder.begin(7, DefaultVertexFormats.POSITION);
	bufferbuilder.pos((double) startX, (double) endY, 0.0D).endVertex();
	bufferbuilder.pos((double) endX, (double) endY, 0.0D).endVertex();
	bufferbuilder.pos((double) endX, (double) startY, 0.0D).endVertex();
	bufferbuilder.pos((double) startX, (double) startY, 0.0D).endVertex();
	tessellator.draw();
	GlStateManager.disableColorLogic();
	GlStateManager.enableTexture2D();
}
 
开发者ID:NickAcPT,项目名称:Lithium-Forge,代码行数:40,代码来源:NickGuiTextField.java

示例3: drawCursorVertical

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * draws the vertical line cursor in the textbox
 */
private void drawCursorVertical(int p_146188_1_, int p_146188_2_, int p_146188_3_, int p_146188_4_) {
    if (p_146188_1_ < p_146188_3_) {
        int i = p_146188_1_;
        p_146188_1_ = p_146188_3_;
        p_146188_3_ = i;
    }

    if (p_146188_2_ < p_146188_4_) {
        int j = p_146188_2_;
        p_146188_2_ = p_146188_4_;
        p_146188_4_ = j;
    }

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

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

    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    GlStateManager.color(0.0F, 0.0F, 255.0F, 255.0F);
    GlStateManager.disableTexture2D();
    GlStateManager.enableColorLogic();
    GlStateManager.colorLogicOp(5387);
    worldrenderer.begin(7, DefaultVertexFormats.POSITION);
    worldrenderer.pos((double) p_146188_1_, (double) p_146188_4_, 0.0D).endVertex();
    worldrenderer.pos((double) p_146188_3_, (double) p_146188_4_, 0.0D).endVertex();
    worldrenderer.pos((double) p_146188_3_, (double) p_146188_2_, 0.0D).endVertex();
    worldrenderer.pos((double) p_146188_1_, (double) p_146188_2_, 0.0D).endVertex();
    tessellator.draw();
    GlStateManager.disableColorLogic();
    GlStateManager.enableTexture2D();
}
 
开发者ID:boomboompower,项目名称:TextDisplayer,代码行数:40,代码来源:ModernTextBox.java

示例4: drawOutlinedBoundingBox

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void drawOutlinedBoundingBox(net.minecraft.util.math.AxisAlignedBB par1AxisAlignedBB)
{
       Tessellator tessellator = Tessellator.getInstance();
       net.minecraft.client.renderer.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(3, DefaultVertexFormats.POSITION);
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ).endVertex();
       tessellator.draw();
       vertexbuffer.begin(3, DefaultVertexFormats.POSITION);
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ).endVertex();
       tessellator.draw();
       vertexbuffer.begin(1, DefaultVertexFormats.POSITION);
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ).endVertex();
       vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ).endVertex();
       tessellator.draw();
       GlStateManager.disableColorLogic();
       GlStateManager.enableTexture2D();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:41,代码来源:RenderUtils.java

示例5: drawCursorVertical

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * draws the vertical line cursor in the textbox
 */
private void drawCursorVertical(int p_146188_1_, int p_146188_2_, int p_146188_3_, int p_146188_4_)
{
    if (p_146188_1_ < p_146188_3_)
    {
        int i = p_146188_1_;
        p_146188_1_ = p_146188_3_;
        p_146188_3_ = i;
    }

    if (p_146188_2_ < p_146188_4_)
    {
        int j = p_146188_2_;
        p_146188_2_ = p_146188_4_;
        p_146188_4_ = j;
    }

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

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

    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    GlStateManager.color(0.0F, 0.0F, 255.0F, 255.0F);
    GlStateManager.disableTexture2D();
    GlStateManager.enableColorLogic();
    GlStateManager.colorLogicOp(5387);
    worldrenderer.begin(7, DefaultVertexFormats.POSITION);
    worldrenderer.pos((double)p_146188_1_, (double)p_146188_4_, 0.0D).endVertex();
    worldrenderer.pos((double)p_146188_3_, (double)p_146188_4_, 0.0D).endVertex();
    worldrenderer.pos((double)p_146188_3_, (double)p_146188_2_, 0.0D).endVertex();
    worldrenderer.pos((double)p_146188_1_, (double)p_146188_2_, 0.0D).endVertex();
    tessellator.draw();
    GlStateManager.disableColorLogic();
    GlStateManager.enableTexture2D();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:45,代码来源:GuiTextField.java

示例6: drawBoundingBox

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void drawBoundingBox(AxisAlignedBB par1AxisAlignedBB)
{
	Tessellator tessellator = Tessellator.getInstance();
       net.minecraft.client.renderer.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(3, DefaultVertexFormats.POSITION);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	tessellator.draw();
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	tessellator.draw();
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	tessellator.draw();
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	tessellator.draw();
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	tessellator.draw();
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.maxY, par1AxisAlignedBB.maxZ);
	vertexbuffer.pos(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ);
	tessellator.draw();
       GlStateManager.disableColorLogic();
       GlStateManager.enableTexture2D();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:68,代码来源:RenderUtils.java

示例7: drawCursorVertical

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * 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();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:45,代码来源:GuiPasswordField.java


注:本文中的net.minecraft.client.renderer.GlStateManager.enableColorLogic方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。