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

Just hit a weird problem with GUI rendering, specifically drawing a tank gauge texture on a GUI screen.  It works fine inside my dev environment, but when the mod is run in a regular client, the problem crops up; instead of the GUI background showing up behind the texture, the background renders solid black, or occasionally with parts of other textures intruding (which suggests that I'm being careless with my texture coords, but I'm pretty sure I'm not - and why would it work in a dev environment and not outside?)

 

The code is here: https://github.com/desht/pnc-repressurized/blob/master/src/main/java/me/desht/pneumaticcraft/client/gui/widget/WidgetTank.java#L48

 

and the texture in question (16 x 64 PNG file, mostly transparent) is here: https://github.com/desht/pnc-repressurized/blob/master/src/main/resources/assets/pneumaticcraft/textures/gui/widget/widget_tank.png

 

And an example of what it looks like (5 tanks here, 3 with solid black, 2 with other textures creeping in): https://imgur.com/a/nUi5E.  The problem happens whether or not there's any fluid to render.  If there is fluid, the fluid renders fine, and the gauge is rendered over the fluid OK.  Just the part that's rendered over the GUI background goes wrong.

 

Anyone seen anything like this before?  It's got me scratching my head...

There might be other mods interfering in rendering, setting/unsetting certain GL switches.

  • Author

Yeah, I'd considered that, but my mod is the one & only mod in my non-dev test world, and I still have the problem.  So other-mod interference can be ruled out.

  • Author

Well, it turns out that it was happening in my dev environment too.  I've worked around the problem for now by just drawing the gauge lines directly with Gui.drawRect() calls, but I'm no nearer to working out why it was a problem...

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.