Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey everyone.

 

Basically all I want to do is to draw a BufferedImage to the screen. Here's the relevant section of my code:

 

TextureManager.instance().makeTexture("playerFace" + e.getName(), 0, 8, 8, 0, 6408, 9728, 9728, false, e.getFace()).bindTexture(0);
drawTexturedModalRect(0, 0, 0, 0, 8, ;

 

I don't really understand what most of the parameters in the makeTexture method do (except for the width, height, and BufferedImage ones), nor the one in bindTexture. Can someone explain what each actually does?

 

Additionally, as is, the code outputs this when run. I assume a problem with a parameter causes this:

 

2013-08-22 22:44:23 [sEVERE] [Minecraft-Client] ########## GL ERROR ##########
2013-08-22 22:44:23 [sEVERE] [Minecraft-Client] @ Post render
2013-08-22 22:44:23 [sEVERE] [Minecraft-Client] 1280: Invalid enum

 

Thanks guys!

  Quote
Basically all I want to do is to draw a BufferedImage to the screen.

in what case do you need specificly a bufferedImage and cant use mc texture system ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

just get the texture of their character then

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

How would I go about that? I've looked through the code, only reference I can find is to the URL of the skin file. Where can I get the texture from (client-side)?

 

Thanks!

  • Author

I'm on 1.5.2, the DynamicTexture class doesn't exist (yet, I assume).

 

The MapItemRenderer class seems to generate the texture on the fly, and I can't quite figure out how it works (sorry).

 

Perhaps I'm looking in the wrong place. I want to draw images (other players' faces) on the overlay (with health bar, XP bar, etc). Is making a Texture the best way to do this? If not, what is?

 

Thanks!

 

EDIT: Here's what I think I should be doing, correct me where I'm wrong:

 

I want to use drawTexturedModelRectFromIcon (sic) in the Gui class. In order to do that, I need to pass in an Icon. Of course I can't instantiate an Icon (basic Java) so I need to use the only class that implements it, TextureStitched. In order to use TextureStitched, I have to pass in a Texture in the init method.

 

Thus, why I want to create a Texture. The easiest way to do this appears to be the makeTexture method in the TextureManager class, but I'm not sure what all of the parameters do - leading back to my initial question.

 

Another way to do it is to use createEmptyTexture and then call transferFromImage on the resulting object, but then I still run into the same problem manifested differently: I don't know what the second or fifth parameters of that method do (although I'm pretty sure the second does nothing).

 

While I'm at it: what do u and v refer to? (Take for example the method addVertexWithUV)

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.