Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Changing the scale of a texture
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
DrEinsteinium

Changing the scale of a texture

By DrEinsteinium, January 11, 2014 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

DrEinsteinium    1

DrEinsteinium

DrEinsteinium    1

  • Stone Miner
  • DrEinsteinium
  • Members
  • 1
  • 54 posts
Posted January 11, 2014

Hey guys, I have a ResourceLocation of the player's skin, which as we all know is devised into different sections. The sections I am focusing on right now are the player's head, which are 8x8 squares  depicting each side of the head. I want to be able to render these squares into a GUI, but 8x8 is way too small for my needs. So how would I scale up the size of the texture without losing any resolution?

 

Here is what I have right now.

        //this.size = 8
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        Minecraft.getMinecraft().getTextureManager().bindTexture(this.playerskin);      
        // Draw the background layer, aka the player's face.
        this.drawTexturedModalRect(this.posX, this.posY, 8, 8, this.size, this.size);
        // Draw the foreground layer, aka the player's hat or mask. 
        this.drawTexturedModalRect(this.posX, this.posY, 40, 8, this.size, this.size);

 

I don't -think- this works, as when you change size to a different number it wont resize the texture but instead resize the "field of vision" (or whatever you prefer to call it) of the renderer.

 

Thanks in advance

  • Quote

Share this post


Link to post
Share on other sites

larsgerrits    510

larsgerrits

larsgerrits    510

  • Reality Controller
  • larsgerrits
  • Members
  • 510
  • 3455 posts
Posted January 11, 2014

GL11.glScalef(...);

  • Quote

Share this post


Link to post
Share on other sites

DrEinsteinium    1

DrEinsteinium

DrEinsteinium    1

  • Stone Miner
  • DrEinsteinium
  • Members
  • 1
  • 54 posts
Posted January 11, 2014

FFS. I looked in GL11 for that but for some stupid reason I didn't see it. Thanks for assisting my blind eyes.

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Yanny7
      [1.14.4] Stone Age mod

      By Yanny7 · Posted 5 minutes ago

      v1.0.1 - added mammoth tusk item - added Mammoth entity - moved tools to mod group - integrated TheOneProbe - drying rack improved add/remove item - fixed Aquaduct connecting vertically
    • salvestrom
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By salvestrom · Posted 19 minutes ago

      I did not say at any point that your model should extend model entity.   This requires three classes. Your entity class should extend HorseEntity giving you access to all of the GUI, saddling and taming. Your render class should be adjusted to not be using the superfluous classy created, as I previously mentioned. Your model class needs to extend HorseModel – this is how you will inherit the animations and bulk of the model.   Note that AbstractHorseEntity does not have all of the code for horses, only the shared code between the various horse entities.
    • RyanGV95
      Forge Can't Install

      By RyanGV95 · Posted 1 hour ago

      I’ll give that a shot after I get off. Thanks so much!
    • solitone
      Distinguish singleplayer vs. multiplayer

      By solitone · Posted 1 hour ago

      So I would have ServerScriptItem and ClientScriptItem, both inheriting from ScriptItem, and I would register a ServerScriptItem object on the dedicated server and a ClientScriptItem object on the client?
    • Draco18s
      1.12.2-Problem with tile entity custom crafting table

      By Draco18s · Posted 1 hour ago

      https://mcforge.readthedocs.io/en/1.13.x/networking/
  • Topics

    • Yanny7
      1
      [1.14.4] Stone Age mod

      By Yanny7
      Started 3 hours ago

    • DragonITA
      27
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA
      Started Monday at 10:06 AM

    • RyanGV95
      3
      Forge Can't Install

      By RyanGV95
      Started 3 hours ago

    • solitone
      14
      Distinguish singleplayer vs. multiplayer

      By solitone
      Started December 5

    • mindstorm3223
      3
      1.12.2-Problem with tile entity custom crafting table

      By mindstorm3223
      Started Yesterday at 02:18 AM

  • Who's Online (See full list)

    • Toast10
    • diesieben07
    • plugsmustard
    • Yanny7
    • Lea9ue
    • Jaffaaaaa
    • xieao
    • Lithium941
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Changing the scale of a texture
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community