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


Java GL13.glClientActiveTexture方法代码示例

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


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

示例1: preRender

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
public void preRender() {
    glEnableClientState(GL_VERTEX_ARRAY);
    if (hasTexCoord0 || hasTexCoord1) glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    if (hasColor) glEnableClientState(GL_COLOR_ARRAY);
    if (hasNormal) glEnableClientState(GL_NORMAL_ARRAY);

    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboVertexBuffer);
    GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, vboIndexBuffer);

    glVertexPointer(VERTEX_SIZE, GL11.GL_FLOAT, stride, vertexOffset);

    if (hasTexCoord0) {
        GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
        glTexCoordPointer(TEX_COORD_0_SIZE, GL11.GL_FLOAT, stride, texCoord0Offset);
    }

    if (hasTexCoord1) {
        GL13.glClientActiveTexture(GL13.GL_TEXTURE1);
        glTexCoordPointer(TEX_COORD_1_SIZE, GL11.GL_FLOAT, stride, texCoord1Offset);
    }

    if (hasColor) glColorPointer(COLOR_SIZE, GL11.GL_FLOAT, stride, colorOffset);
    if (hasNormal) glNormalPointer(GL11.GL_FLOAT, stride, normalOffset);
}
 
开发者ID:zoneXcoding,项目名称:Mineworld,代码行数:25,代码来源:Mesh.java

示例2: setClientActiveTexture

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
/**
 * Sets the current lightmap texture to the specified OpenGL constant
 */
public static void setClientActiveTexture(int texture)
{
    if (arbMultitexture)
    {
        ARBMultitexture.glClientActiveTextureARB(texture);
    }
    else
    {
        GL13.glClientActiveTexture(texture);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:15,代码来源:OpenGlHelper.java

示例3: setClientActiveTexture

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
/**
 * Sets the current lightmap texture to the specified OpenGL constant
 */
public static void setClientActiveTexture(int par0)
{
    if (useMultitextureARB)
    {
        ARBMultitexture.glClientActiveTextureARB(par0);
    }
    else
    {
        GL13.glClientActiveTexture(par0);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:15,代码来源:OpenGlHelper.java

示例4: setClientActiveTexture

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
public static void setClientActiveTexture(int p_77472_0_)
{
    if (field_153215_z)
    {
        ARBMultitexture.glClientActiveTextureARB(p_77472_0_);
    }
    else
    {
        GL13.glClientActiveTexture(p_77472_0_);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:12,代码来源:OpenGlHelper.java

示例5: func_77472_b

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
public static void func_77472_b(int p_77472_0_) {
   if(field_77477_c) {
      ARBMultitexture.glClientActiveTextureARB(p_77472_0_);
   } else {
      GL13.glClientActiveTexture(p_77472_0_);
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:9,代码来源:OpenGlHelper.java

示例6: renderVbo

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
private void renderVbo(int id) {
    if (_lock.tryLock()) {
        try {
            if (_vertexBuffers[id] <= 0 || _disposed)
                return;

            glEnableClientState(GL_VERTEX_ARRAY);
            glEnableClientState(GL_TEXTURE_COORD_ARRAY);
            glEnableClientState(GL_COLOR_ARRAY);
            glEnableClientState(GL_NORMAL_ARRAY);

            GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, _idxBuffers[id]);
            GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, _vertexBuffers[id]);

            glVertexPointer(3, GL11.GL_FLOAT, STRIDE, OFFSET_VERTEX);

            GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
            glTexCoordPointer(3, GL11.GL_FLOAT, STRIDE, OFFSET_TEX_0);

            GL13.glClientActiveTexture(GL13.GL_TEXTURE1);
            glTexCoordPointer(3, GL11.GL_FLOAT, STRIDE, OFFSET_TEX_1);

            glColorPointer(4, GL11.GL_FLOAT, STRIDE, OFFSET_COLOR);

            glNormalPointer(GL11.GL_FLOAT, STRIDE, OFFSET_NORMAL);

            GL11.glDrawElements(GL11.GL_TRIANGLES, _vertexCount[id], GL11.GL_UNSIGNED_INT, 0);

            glDisableClientState(GL_NORMAL_ARRAY);
            glDisableClientState(GL_COLOR_ARRAY);
            glDisableClientState(GL_TEXTURE_COORD_ARRAY);
            glDisableClientState(GL_VERTEX_ARRAY);

            GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
            GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, 0);
        } finally {
            _lock.unlock();
        }
    }
}
 
开发者ID:zoneXcoding,项目名称:Mineworld,代码行数:41,代码来源:ChunkMesh.java

示例7: preRender

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
public void preRender() {
    glEnableClientState(GL_VERTEX_ARRAY);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    glEnableClientState(GL_NORMAL_ARRAY);

    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboUVBuffer);
    GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
    glTexCoordPointer(2, GL11.GL_FLOAT, TEX_COORD_SIZE * 4, 0);

    GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, vboIndexBuffer);
}
 
开发者ID:zoneXcoding,项目名称:Mineworld,代码行数:12,代码来源:SkeletalMesh.java

示例8: doRender

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
@Override
public void doRender(EntityCurse entity, double x, double y, double z, float entityYaw, float partialTicks)
{
	GL11.glPushMatrix();
	GL11.glDisable(2884 /*GL_CULL_FACE*/);

	try
	{
		float rotation = entity.getRotation();
		float rotationYaw = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks;

		float ageInTicks = (float)(entity.ticksExisted + partialTicks);
		float netHeadYaw = rotationYaw - rotation;
		float headPitch = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks;
		float scale = 0.0625F;

		GL11.glTranslatef((float)x, (float)y, (float)z);

		for (int i = 0; i < 3; i++)
		{
			GL11.glPushMatrix();

			GL11.glRotatef(180.0F - rotation, 0.0F, rotation, 0.0F);
			rotation += 120.0F;

			GL11.glEnable(32826 /*GL_RESCALE_NORMAL_EXT*/);
			GL11.glScalef(-1.0F, -1.0F, 1.0F);
			this.preRenderCallback(entity, partialTicks);
			GL11.glTranslatef(0.0F, -24.0F * scale - 0.0078125F, 0.0F);

			this.bindEntityTexture(entity);
			GL11.glScalef(1.01F, 1.01F, 1.01F);
			//GL11.glDisable(2896 /*GL_LIGHTING*/);
			GL11.glEnable(3042 /*GL_BLEND*/);
			GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
			GL11.glBlendFunc(1, 1);

			this.switchModel(entity);
			this.mainModel.render(entity, 0.0F, 0.0F, ageInTicks, netHeadYaw, headPitch, scale);

			GL11.glPopMatrix();
		}
		GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
		GL11.glDisable(3042 /*GL_BLEND*/);
		//GL11.glEnable(2896 /*GL_LIGHTING*/);
		GL11.glDisable(32826 /*GL_RESCALE_NORMAL_EXT*/);
		GL11.glDisable(2884 /*GL_CULL_FACE*/);
	}
	catch (Exception exception)
	{
		exception.printStackTrace();
	}

	GL13.glClientActiveTexture(33985 /*GL_TEXTURE1_ARB*/);
	GL13.glActiveTexture(33985 /*GL_TEXTURE1_ARB*/);
	GL11.glEnable(3553 /*GL_TEXTURE_2D*/);
	GL13.glClientActiveTexture(33984 /*GL_TEXTURE0_ARB*/);
	GL13.glActiveTexture(33984 /*GL_TEXTURE0_ARB*/);
	GL11.glEnable(2884 /*GL_CULL_FACE*/);
	GL11.glPopMatrix();
}
 
开发者ID:crazysnailboy,项目名称:Halloween,代码行数:62,代码来源:RenderCurse.java

示例9: clientActiveTexture

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
public final static void clientActiveTexture(int texture) {
	if (GLContext.getCapabilities().OpenGL13)
		GL13.glClientActiveTexture(texture);
	else
		ARBMultitexture.glClientActiveTextureARB(texture);
}
 
开发者ID:sunenielsen,项目名称:tribaltrouble,代码行数:7,代码来源:GLState.java

示例10: renderBatch

import org.lwjgl.opengl.GL13; //导入方法依赖的package包/类
private void renderBatch(TFloatList vertexData, TIntList indexData) {
    if (vertexData.size() == 0 || indexData.size() == 0) return;

    PerformanceMonitor.startActivity("BatchRenderMesh");
    FloatBuffer vertexBuffer = BufferUtils.createFloatBuffer(vertexData.size());
    vertexBuffer.put(vertexData.toArray());
    vertexBuffer.flip();
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, batchVertexBuffer);
    GL15.glBufferData(GL15.GL_ARRAY_BUFFER, vertexBuffer, GL15.GL_DYNAMIC_DRAW);

    IntBuffer indexBuffer = BufferUtils.createIntBuffer(indexData.size());
    indexBuffer.put(indexData.toArray());
    indexBuffer.flip();
    GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, batchIndexBuffer);
    GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, indexBuffer, GL15.GL_DYNAMIC_DRAW);

    glPushMatrix();

    glEnableClientState(GL_VERTEX_ARRAY);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    glEnableClientState(GL_COLOR_ARRAY);
    glEnableClientState(GL_NORMAL_ARRAY);

    //GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, batchVertexBuffer);
    //GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, batchIndexBuffer);

    glVertexPointer(Mesh.VERTEX_SIZE, GL11.GL_FLOAT, 15 * 4, 0);
    GL13.glClientActiveTexture(GL13.GL_TEXTURE0);
    glTexCoordPointer(Mesh.TEX_COORD_0_SIZE, GL11.GL_FLOAT, 15 * 4, 4 * 3);
    GL13.glClientActiveTexture(GL13.GL_TEXTURE1);
    glTexCoordPointer(Mesh.TEX_COORD_1_SIZE, GL11.GL_FLOAT, 15 * 4, 4 * 5);
    glColorPointer(Mesh.COLOR_SIZE, GL11.GL_FLOAT, 15 * 4, 4 * 11);
    glNormalPointer(GL11.GL_FLOAT, 15 * 4, 4 * 8);

    GL12.glDrawRangeElements(GL11.GL_TRIANGLES, 0, indexData.size(), indexData.size(), GL_UNSIGNED_INT, 0);

    glDisableClientState(GL_NORMAL_ARRAY);
    glDisableClientState(GL_COLOR_ARRAY);
    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
    glDisableClientState(GL_VERTEX_ARRAY);

    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
    GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, 0);
    glPopMatrix();
    PerformanceMonitor.endActivity();
}
 
开发者ID:zoneXcoding,项目名称:Mineworld,代码行数:47,代码来源:MeshRenderer.java


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