當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。