Posted April 26, 20169 yr 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
April 26, 20169 yr 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()
April 26, 20169 yr 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.