本文整理匯總了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}