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

Hello, I have a problem when create the GUI in full screen. The fact that minecraft scales resolution in gui and etc. I have a question, is it possible to disable it, that the resolution is not scaled? My code:

glMatrixMode(GL_PROJECTION)
        glMatrix {
            glLoadIdentity()
            glViewport(0, 0, mc.displayWidth, mc.displayHeight)
            glOrtho(0.0, 800.0, 600.0, 0.0, 1000.0, 3000.0)

            glMatrixMode(GL_MODELVIEW)
            glMatrix {
                glLoadIdentity()
                glTranslated(0.0, 0.0, -2000.0)
                glClearColor(1.0f, 1.0f, 1.0f, 0.0f)
                glClearDepth(1.0)
                glClear(GL11.GL_COLOR_BUFFER_BIT or GL11.GL_DEPTH_BUFFER_BIT)
                // render something
                glMatrixMode(GL_MODELVIEW)
            }
            glMatrixMode(GL_PROJECTION)
        }

P.s. glMatrix ->

GLStateManager.pushMatrix()

block() <- Kotlin blocks

GLStateManager.popMatrix()

Well first and foremost stop using GL11 directly. Use GlStateManager.

Why do you need to disable the GUI scaling exactly? You can easily draw anything you want based on width/height and have your fullscreen GUI independent of the scaling factor.

 

3 hours ago, WildHeart said:

glMatrix ->

GLStateManager.pushMatrix()

You don't actually need to be pushing/popping matrix here at all because if you are doing it in the middle of your operations you are screwing them up and once your drawing is done the game will reset the matrix anyway.

 

3 hours ago, WildHeart said:

// render something

glMatrixMode(GL_MODELVIEW)

The matrix mode is already modelview though. You've just set it to modelview 7 lines above and you haven't changed it.

 

3 hours ago, WildHeart said:

glClearColor(1.0f, 1.0f, 1.0f, 0.0f)

glClearDepth(1.0)

glClear(GL11.GL_COLOR_BUFFER_BIT or GL11.GL_DEPTH_BUFFER_BIT)

Any reason you are doing this? The game just did that for you like 6 operations or so ago. You are not using a different framebuffer after all and the one currently in use has just been cleared.

 

3 hours ago, WildHeart said:

glViewport(0, 0, mc.displayWidth, mc.displayHeight)

You don't need to be doing this. The viewport is already set to the game's display width/height. Or to the custom framebuffer's resolution. In fact you could be screwing up someone's framebuffer setup by doing that.

 

Apart from all that looks fine-ish to me. Fix all that and see if you have any more issues.

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.