Posted March 18, 201312 yr i'm trying to draw a health new health bar on the in game in my tick handler. but the font is acting really weird. never had a problem with this before but since i updated to 1.5 it stated happening. what happens is for 1 sec when the game loads it gives the normal font. but afterwards the font gets the texture of the image i rendered underneath it. this is my code: GL11.glBindTexture(GL11.GL_TEXTURE_2D, mc.renderEngine.getTexture("/mods/legendz/textures/gui/hud.png")); GL11.glPushMatrix(); gig.drawTexturedModalRect((width/2)-91, (height)-39, 0, 96, 82, 9); gig.drawTexturedModalRect((width/2)-89, height-37, 0, 105, 78, 5); gig.drawCenteredString(fontrenderer, player.getHealth()+"/"+player.getMaxHealth(), width/2-45, height-39, 0xFFFFFF); GL11.glPopMatrix(); http://www.minecraftforum.net/topic/1937703-162smpforge-pet-mastery-hatch-level-battle/
March 18, 201312 yr Author can i ask you which method that is? the method used before 1.5 doesnt exists anymore. http://www.minecraftforum.net/topic/1937703-162smpforge-pet-mastery-hatch-level-battle/
March 18, 201312 yr The method is func_98187_b. But I don't know if it'll work. What I did was before you bind new texture: int prevtext = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D); And before you render text GL11.glBindTexture(GL11.GL_TEXTURE_2D, prevtext); Worked for me
March 18, 201312 yr @diesieben07: Not if you sync them afterwards. I agree, using OGL sometimes may cause some bugs, but not if you know what you do. Besides, their new system broke everything in terms of rendering, and there's no guaranty it'll stay the way it is. IMO, in some way, OGL can be even better and more reliable (again, if you know what you're doing and sync everything afterwards).
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.