本文整理汇总了Java中org.lwjgl.opengl.GL11.glCopyTexSubImage2D方法的典型用法代码示例。如果您正苦于以下问题:Java GL11.glCopyTexSubImage2D方法的具体用法?Java GL11.glCopyTexSubImage2D怎么用?Java GL11.glCopyTexSubImage2D使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.glCopyTexSubImage2D方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateSubTex1
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void updateSubTex1(int[] src, int width, int height, int posX, int posY)
{
int i = 0;
int j = width;
int k = height;
int l = posX;
for (int i1 = posY; j > 0 && k > 0; i1 /= 2)
{
GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, i, l, i1, 0, 0, j, k);
++i;
j /= 2;
k /= 2;
l /= 2;
}
}
示例2: beginTranslucent
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void beginTranslucent()
{
if (Shaders.isRenderingWorld)
{
if (Shaders.usedDepthBuffers >= 2)
{
GlStateManager.setActiveTexture(33995);
Shaders.checkGLError("pre copy depth");
GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, Shaders.renderWidth, Shaders.renderHeight);
Shaders.checkGLError("copy depth");
GlStateManager.setActiveTexture(33984);
}
Shaders.useProgram(12);
}
}
示例3: beginWeather
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void beginWeather()
{
if (!isShadowPass)
{
if (usedDepthBuffers >= 3)
{
GlStateManager.setActiveTexture(33996);
GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, renderWidth, renderHeight);
GlStateManager.setActiveTexture(33984);
}
GlStateManager.enableDepth();
GlStateManager.enableBlend();
GlStateManager.blendFunc(770, 771);
GlStateManager.enableAlpha();
useProgram(20);
}
}
示例4: rotateAndBlurSkybox
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
* Rotate and blurs the skybox view in the main menu
*/
private void rotateAndBlurSkybox(float p_73968_1_)
{
this.mc.getTextureManager().bindTexture(this.backgroundTexture);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.colorMask(true, true, true, false);
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
GlStateManager.disableAlpha();
int i = 3;
for (int j = 0; j < i; ++j)
{
float f = 1.0F / (float)(j + 1);
int k = this.width;
int l = this.height;
float f1 = (float)(j - i / 2) / 256.0F;
worldrenderer.pos((double)k, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos((double)k, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos(0.0D, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos(0.0D, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
}
tessellator.draw();
GlStateManager.enableAlpha();
GlStateManager.colorMask(true, true, true, true);
}
示例5: preWater
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void preWater()
{
if (usedDepthBuffers >= 2)
{
GlStateManager.setActiveTexture(33995);
checkGLError("pre copy depth");
GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, renderWidth, renderHeight);
checkGLError("copy depth");
GlStateManager.setActiveTexture(33984);
}
ShadersTex.bindNSTextures(defaultTexture.getMultiTexID());
}
示例6: rotateAndBlurSkybox
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void rotateAndBlurSkybox(float p_73968_1_)
{
this.mc.getTextureManager().bindTexture(this.panoramaLoc);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.colorMask(true, true, true, false);
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
GlStateManager.disableAlpha();
int i = 3;
for (int j = 0; j < i; ++j)
{
float f = 1.0F / (float)(j + 1);
int k = this.width;
int l = this.height;
float f1 = (float)(j - i / 2) / 256.0F;
worldrenderer.pos((double)k, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos((double)k, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos(0.0D, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos(0.0D, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
}
tessellator.draw();
GlStateManager.enableAlpha();
GlStateManager.colorMask(true, true, true, true);
}
示例7: rotateAndBlurSkybox
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void rotateAndBlurSkybox(float p_73968_1_) {
this.mc.getTextureManager().bindTexture(this.backgroundTexture);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.colorMask(true, true, true, false);
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
GlStateManager.disableAlpha();
int i = 3;
for (int j = 0; j < i; ++j) {
float f = 1.0F / (float) (j + 1);
int k = this.width;
int l = this.height;
float f1 = (float) (j - i / 2) / 256.0F;
worldrenderer.pos((double) k, (double) l, (double) this.zLevel).tex((double) (0.0F + f1), 1.0D)
.color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos((double) k, 0.0D, (double) this.zLevel).tex((double) (1.0F + f1), 1.0D)
.color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos(0.0D, 0.0D, (double) this.zLevel).tex((double) (1.0F + f1), 0.0D)
.color(1.0F, 1.0F, 1.0F, f).endVertex();
worldrenderer.pos(0.0D, (double) l, (double) this.zLevel).tex((double) (0.0F + f1), 0.0D)
.color(1.0F, 1.0F, 1.0F, f).endVertex();
}
tessellator.draw();
GlStateManager.enableAlpha();
GlStateManager.colorMask(true, true, true, true);
}
示例8: glCopyTexSubImage2D
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void glCopyTexSubImage2D(int p_187443_0_, int p_187443_1_, int p_187443_2_, int p_187443_3_, int p_187443_4_, int p_187443_5_, int p_187443_6_, int p_187443_7_)
{
GL11.glCopyTexSubImage2D(p_187443_0_, p_187443_1_, p_187443_2_, p_187443_3_, p_187443_4_, p_187443_5_, p_187443_6_, p_187443_7_);
}