Java Code Examples for net.minecraft.client.renderer.OpenGlHelper#setActiveTexture()
The following examples show how to use
net.minecraft.client.renderer.OpenGlHelper#setActiveTexture() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GuiSurgery.java From Cyberware with MIT License | 6 votes |
public void renderEntity(Entity entity, float x, float y, float scale, float rotation) { GlStateManager.enableColorMaterial(); GlStateManager.pushMatrix(); GlStateManager.translate(x, y, 50.0F); GlStateManager.scale(-scale, scale, scale); GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F); GlStateManager.rotate(rotation, 0.0F, 1.0F, 0.0F); RenderHelper.enableStandardItemLighting(); Minecraft.getMinecraft().getRenderManager().playerViewY = 180.0F; Minecraft.getMinecraft().getRenderManager().doRenderEntity(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F, false); GlStateManager.popMatrix(); RenderHelper.disableStandardItemLighting(); GlStateManager.disableRescaleNormal(); OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GlStateManager.disableTexture2D(); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); GlStateManager.enableTexture2D(); }
Example 2
Source File: GuiSurgery.java From Cyberware with MIT License | 6 votes |
public void renderModel(ModelBase model, float x, float y, float scale, float rotation) { GlStateManager.enableColorMaterial(); GlStateManager.pushMatrix(); GlStateManager.translate(x, y, 120F); GlStateManager.scale(-scale, scale, scale); GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F); GlStateManager.rotate(10.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(rotation, 0.0F, 1.0F, 0.0F); RenderHelper.enableStandardItemLighting(); float f1 = 0.7F; GlStateManager.glLightModel(2899, RenderHelper.setColorBuffer(f1, f1, f1, 1.0F)); model.render(null, 0, 0, 0, 0, 0, .0625f); GlStateManager.popMatrix(); RenderHelper.disableStandardItemLighting(); GlStateManager.disableRescaleNormal(); OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GlStateManager.disableTexture2D(); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); GlStateManager.enableTexture2D(); }
Example 3
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public static void disableLightmap() { OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); }
Example 4
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public static void enableLightmap() { OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); glEnable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); }
Example 5
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public static void disableLightmap() { OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); }
Example 6
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public static void enableLightmap() { OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); glEnable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); }
Example 7
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public static void disableLightmap() { OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); }
Example 8
Source File: RenderUtility.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
public static void enableLightmap() { OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); glEnable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); }