CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Solved How to render images on screen

    ScriptAPI
    3
    5
    132
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Purpl3 YT
      Purpl3 YT last edited by

      How to render image on screen, i find to do this 30 minutes.
      Help pls.

      Plumer Man 1 Reply Last reply Reply Quote 0
      • Plumer Man
        Plumer Man @Purpl3 YT last edited by

        @purpl3-yt use the image assest

        Purpl3 YT 1 Reply Last reply Reply Quote 0
        • Purpl3 YT
          Purpl3 YT @Plumer Man last edited by

          @plumer-man I'm sorry I do not know how it works can you show an example code?

          T 1 Reply Last reply Reply Quote 0
          • T
            ThrowAway39234 @Purpl3 YT last edited by

            @purpl3-yt You can use GL11.GL_QUADS to render an image, you just need to bind the image, in minecraft you bind the image like so mc.getTextureManager().bindTexture(new ResourceLocation("path to resource or image inside /assets/minecraft/"))

            and render the quads like so:

            GL11.glBegin(GL11.GL_QUADS);
            GL11.glTexCoord(0, 0);
            GL11.glVertex2d(x, y);
            GL11.glTexCoord(1, 0);
            GL11.glVertex2d(x2, y);
            GL11.glTexCoord(1, 1);
            GL11.glVertex2d(x2, y2);
            GL11.glTexCoord(0, 1);
            GL11.glVertex2d(x, y2);
            GL11.glEnd();
            
            Purpl3 YT 1 Reply Last reply Reply Quote 1
            • Purpl3 YT
              Purpl3 YT @ThrowAway39234 last edited by

              @throwaway39234 Thank you

              1 Reply Last reply Reply Quote 0
              • Topic has been marked as solved  Purpl3 YT Purpl3 YT 
              • First post
                Last post
              About
              • Terms of Service
              • Privacy Policy
              • Status
              • Contact Us
              Downloads
              • Releases
              • Source code
              • License
              Docs
              • Tutorials
              • CustomHUD
              • AutoSettings
              • ScriptAPI
              Community
              • Forum
              • Guilded
              • YouTube
              • Twitter
              • D.Tube