List of usage examples for org.lwjgl.opengl GL11 glTranslatef
public static native void glTranslatef(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z);
From source file:com.mtbs3d.minecrift.VRRenderer.java
License:LGPL
private void doDistortionAndSuperSample() { int FBWidth = this.mc.displayFBWidth; int FBHeight = this.mc.displayFBHeight; if (this.mc.vrSettings.useDistortion || this.mc.vrSettings.useSupersample || this.mc.vrSettings.useFXAA) { // Setup ortho projection GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity();//from w w w .jav a 2 s. co m GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glTranslatef(0.0f, 0.0f, -0.7f); } if (this.mc.vrSettings.useSupersample) { FBWidth = (int) ceil(this.mc.displayFBWidth * this.mc.vrSettings.superSampleScaleFactor); FBHeight = (int) ceil(this.mc.displayFBHeight * this.mc.vrSettings.superSampleScaleFactor); } if (mc.vrSettings.useDistortion) { //mc.checkGLError("Before distortion"); preDistortionFBO.bindTexture(); if (this.mc.vrSettings.useFXAA) { //chain into the FXAA FBO fxaaFBO.bindRenderTarget(); } else if (this.mc.vrSettings.useSupersample) { //chain into the superSample FBO postDistortionFBO.bindRenderTarget(); } else { unbindFBORenderTarget(); } GL11.glClearColor(1.0f, 1.0f, 1.0f, 0.5f); GL11.glClearDepth(1.0D); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer on the framebuffer to black // Render onto the entire screen framebuffer GL11.glViewport(0, 0, FBWidth, FBHeight); // Set the distortion shader as in use ARBShaderObjects.glUseProgramObjectARB(_Distortion_shaderProgramId); // Set up the fragment shader uniforms ARBShaderObjects.glUniform1iARB(_DistortionShader_RenderTextureUniform, 0); if (this.mc.vrSettings.useDistortionTextureLookupOptimisation) { distortParams.bindTexture_Unit1(); ARBShaderObjects.glUniform1iARB(_DistortionShader_DistortionMapUniform, 1); } ARBShaderObjects.glUniform1iARB(_DistortionShader_half_screenWidthUniform, distortParams.half_screenWidth); ARBShaderObjects.glUniform2fARB(_DistortionShader_LeftLensCenterUniform, distortParams.leftLensCenterX, distortParams.leftLensCenterY); ARBShaderObjects.glUniform2fARB(_DistortionShader_RightLensCenterUniform, distortParams.rightLensCenterX, distortParams.rightLensCenterY); ARBShaderObjects.glUniform2fARB(_DistortionShader_LeftScreenCenterUniform, distortParams.leftScreenCenterX, distortParams.leftScreenCenterY); ARBShaderObjects.glUniform2fARB(_DistortionShader_RightScreenCenterUniform, distortParams.rightScreenCenterX, distortParams.rightScreenCenterY); ARBShaderObjects.glUniform2fARB(_DistortionShader_ScaleUniform, distortParams.scaleX, distortParams.scaleY); ARBShaderObjects.glUniform2fARB(_DistortionShader_ScaleInUniform, distortParams.scaleInX, distortParams.scaleInY); ARBShaderObjects.glUniform4fARB(_DistortionShader_HmdWarpParamUniform, distortParams.DistortionK[0], distortParams.DistortionK[1], distortParams.DistortionK[2], distortParams.DistortionK[3]); ARBShaderObjects.glUniform4fARB(_DistortionShader_ChromAbParamUniform, distortParams.ChromaticAb[0], distortParams.ChromaticAb[1], distortParams.ChromaticAb[2], distortParams.ChromaticAb[3]); drawQuad(); // Stop shader use ARBShaderObjects.glUseProgramObjectARB(0); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); //mc.checkGLError("After distortion"); } if (this.mc.vrSettings.useFXAA) { fxaaFBO.bindTexture(); if (this.mc.vrSettings.useSupersample) { //chain into the superSample FBO postDistortionFBO.bindRenderTarget(); } else { unbindFBORenderTarget(); } GL11.glClearColor(1.0f, 1.0f, 1.0f, 0.5f); GL11.glClearDepth(1.0D); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer on the framebuffer to black // Render onto the entire screen framebuffer GL11.glViewport(0, 0, FBWidth, FBHeight); // Set the distortion shader as in use ARBShaderObjects.glUseProgramObjectARB(_FXAA_shaderProgramId); // Set up the fragment shader uniforms ARBShaderObjects.glUniform1iARB(_FXAA_RenderTextureUniform, 0); ARBShaderObjects.glUniform2fARB(_FXAA_RenderedTextureSizeUniform, (float) FBWidth, (float) FBHeight); drawQuad(); // Stop shader use ARBShaderObjects.glUseProgramObjectARB(0); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); //ShaderHelper.checkGLError("After fxaa"); } if (this.mc.vrSettings.useSupersample) { // Now switch to 1st pass target framebuffer postSuperSampleFBO.bindRenderTarget(); // Bind the FBO postDistortionFBO.bindTexture(); GL11.glClearColor(0.0f, 0.0f, 1.0f, 0.5f); GL11.glClearDepth(1.0D); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer on the framebuffer to black // Render onto the entire screen framebuffer GL11.glViewport(0, 0, this.mc.displayFBWidth, FBHeight); // Set the downsampling shader as in use ARBShaderObjects.glUseProgramObjectARB(_Lanczos_shaderProgramId); // Set up the fragment shader uniforms ARBShaderObjects.glUniform1fARB(_LanczosShader_texelWidthOffsetUniform, 1.0f / (3.0f * (float) this.mc.displayFBWidth)); ARBShaderObjects.glUniform1fARB(_LanczosShader_texelHeightOffsetUniform, 0.0f); ARBShaderObjects.glUniform1iARB(_LanczosShader_inputImageTextureUniform, 0); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); // Pass 1 drawQuad(); // mc.checkGLError("After Lanczos Pass1"); // Pass 2 // Now switch to 2nd pass screen framebuffer unbindFBORenderTarget(); postSuperSampleFBO.bindTexture(); GL11.glViewport(0, 0, this.mc.displayFBWidth, this.mc.displayFBHeight); GL11.glClearColor(0.0f, 0.0f, 1.0f, 0.5f); GL11.glClearDepth(1.0D); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); // Bind the texture GL13.glActiveTexture(GL13.GL_TEXTURE0); // Set up the fragment shader uniforms for pass 2 ARBShaderObjects.glUniform1fARB(_LanczosShader_texelWidthOffsetUniform, 0.0f); ARBShaderObjects.glUniform1fARB(_LanczosShader_texelHeightOffsetUniform, 1.0f / (3.0f * (float) this.mc.displayFBHeight)); ARBShaderObjects.glUniform1iARB(_LanczosShader_inputImageTextureUniform, 0); drawQuad(); // Stop shader use ARBShaderObjects.glUseProgramObjectARB(0); // mc.checkGLError("After Lanczos Pass2"); } }
From source file:com.mtbs3d.minecrift.VRRenderer.java
License:LGPL
public void renderWorld(float renderPartialTicks, long nextFrameTime, int renderSceneNumber) { RenderGlobal renderGlobal = this.mc.renderGlobal; EffectRenderer effectRenderer = this.mc.effectRenderer; EntityLivingBase renderViewEntity = this.mc.renderViewEntity; //TODO: fog color isn't quite right yet when eyes split water/air this.updateFogColor(renderPartialTicks); GL11.glClearColor(fogColorRed, fogColorGreen, fogColorBlue, 0.5f); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); GL11.glEnable(GL11.GL_CULL_FACE);//ww w. j a v a2 s.co m GL11.glEnable(GL11.GL_DEPTH_TEST); //mc.checkGLError("FBO init"); this.mc.mcProfiler.startSection("lightTex"); if (this.lightmapUpdateNeeded) { this.updateLightmap(renderPartialTicks); } ActiveRenderInfo.updateRenderInfo(this.mc.thePlayer, this.mc.gameSettings.thirdPersonView == 2); this.mc.mcProfiler.endStartSection("frustrum"); ClippingHelperImpl.getInstance(); // setup clip, using current modelview / projection matrices if (!Config.isSkyEnabled() && !Config.isSunMoonEnabled() && !Config.isStarsEnabled()) { GL11.glDisable(GL11.GL_BLEND); } else { this.setupFog(-1, renderPartialTicks); this.mc.mcProfiler.endStartSection("sky"); renderGlobal.renderSky(renderPartialTicks); } GL11.glEnable(GL11.GL_FOG); this.setupFog(1, renderPartialTicks); if (this.mc.gameSettings.ambientOcclusion != 0) { GL11.glShadeModel(GL11.GL_SMOOTH); } this.mc.mcProfiler.endStartSection("culling"); Frustrum frustrum = new Frustrum(); frustrum.setPosition(renderOriginX, renderOriginY, renderOriginZ); this.mc.renderGlobal.clipRenderersByFrustum(frustrum, renderPartialTicks); if (renderSceneNumber == 0) { this.mc.mcProfiler.endStartSection("updatechunks"); while (!this.mc.renderGlobal.updateRenderers(renderViewEntity, false) && nextFrameTime != 0L) { long var15 = nextFrameTime - System.nanoTime(); if (var15 < 0L || var15 > 1000000000L) { break; } } } if (renderViewEntity.posY < 128.0D) { this.renderCloudsCheck(renderGlobal, renderPartialTicks); } this.mc.mcProfiler.endStartSection("prepareterrain"); this.setupFog(0, renderPartialTicks); GL11.glEnable(GL11.GL_FOG); this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); RenderHelper.disableStandardItemLighting(); this.mc.mcProfiler.endStartSection("terrain"); renderGlobal.sortAndRender(renderViewEntity, 0, (double) renderPartialTicks); GL11.glShadeModel(GL11.GL_FLAT); boolean var16 = Reflector.ForgeHooksClient.exists(); EntityPlayer var18; if (this.debugViewDirection == 0) { RenderHelper.enableStandardItemLighting(); this.mc.mcProfiler.endStartSection("entities"); if (var16) { Reflector.callVoid(Reflector.ForgeHooksClient_setRenderPass, new Object[] { Integer.valueOf(0) }); } //TODO: multiple render passes for entities? renderGlobal.renderEntities(renderViewEntity.getPosition(renderPartialTicks), frustrum, renderPartialTicks); if (var16) { Reflector.callVoid(Reflector.ForgeHooksClient_setRenderPass, new Object[] { Integer.valueOf(-1) }); } RenderHelper.disableStandardItemLighting(); } GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthMask(true); this.setupFog(0, renderPartialTicks); GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_CULL_FACE); this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); WrUpdates.resumeBackgroundUpdates(); if (Config.isWaterFancy()) { this.mc.mcProfiler.endStartSection("water"); if (this.mc.gameSettings.ambientOcclusion != 0) { GL11.glShadeModel(GL11.GL_SMOOTH); } GL11.glColorMask(false, false, false, false); int var17 = renderGlobal.renderAllSortedRenderers(1, (double) renderPartialTicks); if (this.mc.gameSettings.anaglyph) { if (anaglyphField == 0) { GL11.glColorMask(false, true, true, true); } else { GL11.glColorMask(true, false, false, true); } } else { GL11.glColorMask(true, true, true, true); } if (var17 > 0) { renderGlobal.renderAllSortedRenderers(1, (double) renderPartialTicks); } GL11.glShadeModel(GL11.GL_FLAT); } else { this.mc.mcProfiler.endStartSection("water"); renderGlobal.renderAllSortedRenderers(1, (double) renderPartialTicks); } WrUpdates.pauseBackgroundUpdates(); if (var16 && this.debugViewDirection == 0) { RenderHelper.enableStandardItemLighting(); this.mc.mcProfiler.endStartSection("entities"); Reflector.callVoid(Reflector.ForgeHooksClient_setRenderPass, new Object[] { Integer.valueOf(1) }); this.mc.renderGlobal.renderEntities(renderViewEntity.getPosition(renderPartialTicks), frustrum, renderPartialTicks); Reflector.callVoid(Reflector.ForgeHooksClient_setRenderPass, new Object[] { Integer.valueOf(-1) }); RenderHelper.disableStandardItemLighting(); } GL11.glDepthMask(true); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_BLEND); boolean renderOutline = this.mc.vrSettings.alwaysRenderBlockOutline || !this.mc.gameSettings.hideGUI; if (this.mc.currentScreen == null && this.cameraZoom == 1.0D && renderViewEntity instanceof EntityPlayer && this.mc.objectMouseOver != null && !renderViewEntity.isInsideOfMaterial(Material.water) && renderOutline) { var18 = (EntityPlayer) renderViewEntity; GL11.glDisable(GL11.GL_ALPHA_TEST); this.mc.mcProfiler.endStartSection("outline"); if (!var16 || !Reflector.callBoolean(Reflector.ForgeHooksClient_onDrawBlockHighlight, new Object[] { renderGlobal, var18, this.mc.objectMouseOver, Integer.valueOf(0), var18.inventory.getCurrentItem(), Float.valueOf(renderPartialTicks) })) { renderGlobal.drawSelectionBox(var18, this.mc.objectMouseOver, 0, renderPartialTicks); } GL11.glEnable(GL11.GL_ALPHA_TEST); } if (this.mc.currentScreen == null && this.cameraZoom == 1.0D && renderViewEntity instanceof EntityPlayer && !renderViewEntity.isInsideOfMaterial(Material.water) && renderOutline && this.mc.vrSettings.showEntityOutline) { var18 = (EntityPlayer) renderViewEntity; if (var18 != null) { GL11.glDisable(GL11.GL_ALPHA_TEST); this.mc.mcProfiler.endStartSection("entityOutline"); if (this.bb != null) drawBoundingBox(var18, this.bb, renderPartialTicks); GL11.glEnable(GL11.GL_ALPHA_TEST); } } this.mc.mcProfiler.endStartSection("destroyProgress"); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); renderGlobal.drawBlockDamageTexture(Tessellator.instance, renderViewEntity, renderPartialTicks); GL11.glDisable(GL11.GL_BLEND); this.mc.mcProfiler.endStartSection("weather"); this.renderRainSnow(renderPartialTicks); GL11.glDisable(GL11.GL_FOG); if (renderViewEntity.posY >= 128.0D) { this.renderCloudsCheck(renderGlobal, renderPartialTicks); } this.enableLightmap((double) renderPartialTicks); this.mc.mcProfiler.endStartSection("litParticles"); RenderHelper.enableStandardItemLighting(); effectRenderer.renderLitParticles(renderViewEntity, renderPartialTicks); RenderHelper.disableStandardItemLighting(); this.setupFog(0, renderPartialTicks); this.mc.mcProfiler.endStartSection("particles"); effectRenderer.renderParticles(renderViewEntity, renderPartialTicks); this.disableLightmap((double) renderPartialTicks); if (var16) { this.mc.mcProfiler.endStartSection("FRenderLast"); Reflector.callVoid(Reflector.ForgeHooksClient_dispatchRenderLast, new Object[] { renderGlobal, Float.valueOf(renderPartialTicks) }); } if (this.mc.vrSettings.renderFullFirstPersonModel == false) { GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); this.renderHand(renderPartialTicks, renderSceneNumber); } GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); //white crosshair, with blending //Draw crosshair boolean renderCrosshair = this.mc.vrSettings.alwaysRenderInGameCrosshair || !this.mc.gameSettings.hideGUI; if (this.mc.currentScreen == null && this.mc.gameSettings.thirdPersonView == 0 && renderCrosshair) { this.mc.mcProfiler.endStartSection("crosshair"); float crossDepth = (float) Math.sqrt((crossX * crossX + crossY * crossY + crossZ * crossZ)); float scale = 0.025f * crossDepth * this.mc.vrSettings.crosshairScale; GL11.glPushMatrix(); GL11.glTranslatef(crossX, crossY, crossZ); GL11.glRotatef(-this.aimYaw, 0.0F, 1.0F, 0.0F); GL11.glRotatef(this.aimPitch, 1.0F, 0.0F, 0.0F); if (this.mc.vrSettings.crosshairRollsWithHead) GL11.glRotatef(this.cameraRoll, 0.0F, 0.0F, 1.0F); GL11.glScalef(-scale, -scale, scale); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR); this.mc.getTextureManager().bindTexture(Gui.icons); float var7 = 0.00390625F; float var8 = 0.00390625F; Tessellator.instance.startDrawingQuads(); Tessellator.instance.addVertexWithUV(-1, +1, 0, 0, 16 * var8); Tessellator.instance.addVertexWithUV(+1, +1, 0, 16 * var7, 16 * var8); Tessellator.instance.addVertexWithUV(+1, -1, 0, 16 * var7, 0); Tessellator.instance.addVertexWithUV(-1, -1, 0, 0, 0); Tessellator.instance.draw(); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glPopMatrix(); //mc.checkGLError("crosshair"); } this.mc.mcProfiler.endSection(); }
From source file:com.mtbs3d.minecrift.VRRenderer.java
License:LGPL
public void drawLatencyTesterColoredQuad(float r, float g, float b, float a) { GL11.glDisable(GL11.GL_TEXTURE_2D);/*from ww w .ja v a2s. c om*/ GL11.glEnable(GL11.GL_BLEND); // Setup ortho projection GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glTranslatef(0.0f, 0.0f, -0.7f); // Cover the appropriate areas of the screen with the colored quad GL11.glBegin(GL11.GL_QUADS); GL11.glColor4f(r, g, b, a); GL11.glVertex3f(-0.6f, -0.6f, 0.0f); // Bottom Left Of The Texture and Quad GL11.glVertex3f(0.6f, -0.6f, 0.0f); // Bottom Right Of The Texture and Quad GL11.glVertex3f(0.6f, 0.6f, 0.0f); // Top Right Of The Texture and Quad GL11.glVertex3f(-0.6f, 0.6f, 0.0f); // Top Left Of The Texture and Quad GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); }
From source file:com.mtbs3d.minecrift.VRRenderer.java
License:LGPL
/** * Render player hand/*from w w w. j a v a 2 s . c o m*/ */ private void renderHand(float par1, int renderSceneNumber) { if (this.debugViewDirection <= 0) { GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glPushMatrix(); GL11.glLoadIdentity(); if (renderSceneNumber == 0) { // Left eye FloatBuffer leftProj = eyeRenderParams.gl_getLeftProjectionMatrix(); GL11.glLoadMatrix(leftProj); //mc.checkGLError("Set left projection"); } else { // Right eye FloatBuffer rightProj = eyeRenderParams.gl_getRightProjectionMatrix(); GL11.glLoadMatrix(rightProj); //mc.checkGLError("Set right projection"); } float var3 = 0.07F; if (this.mc.gameSettings.anaglyph) { GL11.glTranslatef((float) (-(renderSceneNumber * 2 - 1)) * var3, 0.0F, 0.0F); } if (this.cameraZoom != 1.0D) { GL11.glTranslatef((float) this.cameraYaw, (float) (-this.cameraPitch), 0.0F); GL11.glScaled(this.cameraZoom, this.cameraZoom, 1.0D); } if (this.mc.playerController.enableEverythingIsScrewedUpMode()) { float var4 = 0.6666667F; GL11.glScalef(1.0F, var4, 1.0F); } GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glPushMatrix(); GL11.glLoadIdentity(); // IPD transformation if (renderSceneNumber == 0) { // Left eye FloatBuffer leftEyeTransform = eyeRenderParams.gl_getLeftViewportTransform(); GL11.glMultMatrix(leftEyeTransform); } else { // Right eye FloatBuffer rightEyeTransform = eyeRenderParams.gl_getRightViewportTransform(); GL11.glMultMatrix(rightEyeTransform); } if (this.mc.gameSettings.anaglyph) { GL11.glTranslatef((float) (renderSceneNumber * 2 - 1) * 0.1F, 0.0F, 0.0F); } GL11.glPushMatrix(); this.hurtCameraEffect(par1); if (this.mc.gameSettings.viewBobbing) { this.setupViewBobbing(par1); } if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.playerController.enableEverythingIsScrewedUpMode()) { this.enableLightmap((double) par1); this.itemRenderer.renderItemInFirstPerson(par1); this.disableLightmap((double) par1); } GL11.glPopMatrix(); if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping()) { this.itemRenderer.renderOverlays(par1); this.hurtCameraEffect(par1); } if (this.mc.gameSettings.viewBobbing) { this.setupViewBobbing(par1); } GL11.glPopMatrix(); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glPopMatrix(); GL11.glMatrixMode(GL11.GL_MODELVIEW); } }
From source file:com.pahimar.ee3.client.renderer.item.ItemAlchemicalChestRenderer.java
License:LGPL
private void renderAlchemicalChest(float x, float y, float z) { FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST); GL11.glPushMatrix(); //start GL11.glTranslatef(x, y, z); //size GL11.glRotatef(180, 1, 0, 0);/*w ww . j a va 2 s. co m*/ GL11.glRotatef(-90, 0, 1, 0); modelChest.renderAll(); GL11.glPopMatrix(); //end }
From source file:com.pahimar.ee3.client.renderer.item.ItemAlchemyTableRenderer.java
License:LGPL
private void renderAlchemyTable(float x, float y, float z, float scale) { GL11.glPushMatrix();/*from w w w .j a va2 s. c o m*/ GL11.glDisable(GL11.GL_LIGHTING); // Scale, Translate, Rotate GL11.glScalef(scale, scale, scale); GL11.glTranslatef(x, y, z); GL11.glRotatef(-90F, 1F, 0, 0); // Bind texture FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMY_TABLE); // Render modelAlchemyTable.render(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:com.pahimar.ee3.client.renderer.item.ItemAludelRenderer.java
License:LGPL
private void renderAludel(float x, float y, float z, float scale) { GL11.glPushMatrix();/*from w w w . j av a2 s .c o m*/ GL11.glDisable(GL11.GL_LIGHTING); // Scale, Translate, Rotate GL11.glScalef(scale, scale, scale); GL11.glTranslatef(x, y, z); GL11.glRotatef(-90F, 1F, 0, 0); // Bind texture FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALUDEL); // Render modelAludel.render(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:com.pahimar.ee3.client.renderer.item.ItemCalcinatorRenderer.java
License:LGPL
private void renderCalcinator(float x, float y, float z, float scale) { GL11.glPushMatrix();/*from w w w . j a va2 s . c om*/ GL11.glDisable(GL11.GL_LIGHTING); // Scale, Translate, Rotate GL11.glScalef(scale, scale, scale); GL11.glTranslatef(x, y, z); GL11.glRotatef(-90F, 1F, 0, 0); // Bind texture FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_CALCINATOR); // Render modelCalcinator.render(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:com.pahimar.ee3.client.renderer.item.ItemEnergyCondenserRenderer.java
License:LGPL
private void renderEnergyCondenser(float x, float y, float z) { FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ENERGY_CONDENSER); GL11.glPushMatrix(); //start GL11.glTranslatef(x, y, z); //size GL11.glRotatef(180, 1, 0, 0);/*w w w . ja va 2 s. c o m*/ GL11.glRotatef(-90, 0, 1, 0); modelChest.renderAll(); GL11.glPopMatrix(); //end }
From source file:com.pahimar.ee3.client.renderer.item.ItemGlassBellRenderer.java
License:LGPL
private void renderGlassBell(float x, float y, float z, float scale) { GL11.glPushMatrix();/* w w w . ja va 2s . co m*/ GL11.glDisable(GL11.GL_LIGHTING); // Scale, Translate, Rotate GL11.glScalef(scale, scale, scale); GL11.glTranslatef(x, y, z); GL11.glRotatef(-90F, 1F, 0, 0); // Bind texture FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_GLASS_BELL); // Render modelGlassBell.render(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }