Posted December 26, 20213 yr Hello everyone, I try to use Tesselator class to render some icons on a screen. But it doesn't work and I don't see why because I am just using the same code as AbstractGui#innerBlit with float parameters. I linked here the texture of the icons to display and the texture of the gui container. here is the code of the class where the rendering is done : private void renderQuad(MatrixStack stack, Vector2f origin, Vector2f end, Vector2f uvOrigin, Vector2f uvEnd){ Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferbuilder = tessellator.getBuilder(); RenderSystem.enableBlend(); bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX); Matrix4f matrix4f = stack.last().pose(); bufferbuilder.vertex(matrix4f, origin.x, origin.y, (float)0).uv(uvOrigin.x, uvOrigin.y).endVertex(); bufferbuilder.vertex(matrix4f, origin.x, end.y, (float)0).uv(uvOrigin.x, uvEnd.y).endVertex(); bufferbuilder.vertex(matrix4f, end.x, end.y, (float)0).uv(uvEnd.x, uvEnd.y).endVertex(); bufferbuilder.vertex(matrix4f, end.x, origin.y, (float)0).uv(uvEnd.x, uvOrigin.y).endVertex(); tessellator.end(); } I have already tried to reverse the position of the vertex. GUI of the block / icons to display :
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.