The best way to see how something is done is to see how vanilla does it (provided you aren't trying something entirely new); in this case, the code that displays GUis will show how it is done; the code for 1.6.4 even has two methods that just need to be called with coordinates and/or an icon (IDK about newer versions, aka 1.8+, which are totally bloated and way to hard to work with, if I even considered updating to them):
public void drawTexturedModalRect(int x, int y, int u, int v, int width, int height)
public void drawTexturedModelRectFromIcon(int x, int y, Icon icon, int width, int height)
// An actual example of using drawTexturedModalRect; xSize and ySize are the dimensions of the texture and width and
// height are the dimensions of the screen (set up for you if you use the standard GUI classes).
this.mc.getTextureManager().bindTexture(anvilGuiTextures);
int x = (this.width - this.xSize) >> 1;
int y = (this.height - this.ySize) >> 1;
this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
this.drawTexturedModalRect(x + 59, y + 20, 0, this.ySize + (this.repairContainer.getSlot(0).getHasStack() ? 0 : 16), 110, 16);
I want render an image in middle of the player's screen usin Teselator and BufferBuilder? But how? I tried everything, but it doesn't work.
The best way to see how something is done is to see how vanilla does it (provided you aren't trying something entirely new); in this case, the code that displays GUis will show how it is done; the code for 1.6.4 even has two methods that just need to be called with coordinates and/or an icon (IDK about newer versions, aka 1.8+, which are totally bloated and way to hard to work with, if I even considered updating to them):
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?