Jump to content

Fast blit issue


matthew123

Recommended Posts

My GUI draws thousands of images using blit. This slows it down a lot. I tried copying  the code from  the innerBlit method, and calling the BufferBuilder.end method after all vertices have been created. It does  not work.

This is called for each image i want to draw:

builder.begin(Mode.QUADS, DefaultVertexFormat.POSITION_TEX);
builder.vertex(mat, X1, Y2, 0.0F).uv(0.0F, height).endVertex();
builder.vertex(mat, X2, Y2, 0.0F).uv(width, height).endVertex();
builder.vertex(mat, X2, Y1, 0.0F).uv(width, 0.0F).endVertex();
builder.vertex(mat, X1, Y1, 0.0F).uv(0.0F, 0.0F).endVertex();
builder.end();

and after the loop, this is called:

BufferUploader.end(builder);

I am also getting warning about byte mismatches.

How can I solve this?

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.