Jump to content

[1.7.10] SOLVED Change drawn texture scale


Muramasa

Recommended Posts

So I am drawing a texture to the HUD but when I try and change the scale via GL11.glScalef is effects all other elements(obviously so).

 

Is there something I'm missing or a better way to do this?

 

My current code:

ResourceLocation r = new ResourceLocation("maya:textures/gui/socket16.png");
mc.renderEngine.bindTexture(r);
GL11.glScalef(0.5F, 0.5F, 0.5F);
drawTexturedModalRect(0, 0, 0, 0, 256, 256);

 

Note: the sizes are 256 because is doesn't get cut off.. not sure why that is.

 

Thanks!

Link to comment
Share on other sites

Thanks very much good sir!

 

And for future googlers:

ResourceLocation r = new ResourceLocation("maya:textures/gui/socket16.png");
mc.renderEngine.bindTexture(r);
GL11.glPushMatrix();
GL11.glScalef(0.5F, 0.5F, 0.5F);
drawTexturedModalRect(0, 0, 0, 0, 256, 256);
GL11.glPopMatrix();

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.