Advertisement
Guest User

Untitled

a guest
Sep 18th, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1.  
  2. // Prepare for drawing
  3. TextureUtil.glGenTextures();
  4. TextureUtil.uploadTextureImage(0, image);
  5. GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);
  6. GL11.glColor4f(1, 1, 1, 1);
  7.  
  8. // Draw the image
  9.  
  10. Tessellator t = Tessellator.getInstance();
  11. WorldRenderer wr = t.getWorldRenderer();
  12. wr.startDrawingQuads();
  13. wr.addVertexWithUV(x1, y2, 0, 0, 1);
  14. wr.addVertexWithUV(x2, y2, 0, 1, 1);
  15. wr.addVertexWithUV(x2, y1, 0, 1, 0);
  16. wr.addVertexWithUV(x1, y1, 0, 0, 0);
  17. t.draw();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement