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, How can I render a Quad in the world and apply an TextureAtlasSprite to it?

I tried:

GL11.glBegin(GL11.GL_QUADS);
GL11.glColor3f(1.0f, 1.0f, 1.0f);
        GL11.glVertex3d(x, y, z);
        GL11.glVertex3d(x + 1, y, z);
        GL11.glVertex3d(x + 1, y + 1, z);
        GL11.glVertex3d(x, y + 1, z);
        GL11.glEnd();

 

But it isnt working... Please help me :) I think i cant use the default openGL functions :D

Tessellator tessellator = Tessellator.getInstance();

WorldRenderer renderer = Tessellator.getInstance().getWorldRenderer();

renderer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); // The default vertex format depends on your use case, experiment.

For every vertex:

 

worldrenderer.pos(x,y,z) // If you have u,v you have to add some additional stuff

 

tessellator.draw()

 

 

As of 1.9 WorldRenderer is VertexBuffer.

Lookup Gui.class for use examples of vertex format.

 

render a Quad in the world

 

You know, just adding and drawing vertexes will place them "who knows where". What is your translation/scale context? What event or other rendering are you using?

1.7.10 is no longer supported by forge, you are on your own.

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.