Posted July 12, 201411 yr Hello, I begin with OpenGL and I want to render a texture centered at specific x y cordinates on game screen/HUD (not in world) but I know only do it with text. Some help? Thanks!
July 12, 201411 yr Have a look in the vanilla minecraft GUI code, specifically GuiIngame. That's the class that draws the HUD (toolbar, health, hunger, etc).
July 13, 201411 yr GL11.glColor4f(1F, 1F, 1F, 1F); Minecraft.getMinecraft().renderEngine.bindTexture(yourResLocation); this.drawTexturedModalRect(x, y, xOnTexture(u), yOnTexure(v), width, height); Texture must be 256x256 for this render method.
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.