Skip to content

Instantly share code, notes, and snippets.

@MooglyGuy
Created January 27, 2015 13:00
Show Gist options
  • Save MooglyGuy/927512d7bb43b6bfe924 to your computer and use it in GitHub Desktop.
Save MooglyGuy/927512d7bb43b6bfe924 to your computer and use it in GitHub Desktop.
// This:
builder.begin();
builder.color(0xffffffff);
builder.tex2(0x00f000f0);
builder.vertexUV(0.0f, 0.0f, 0.0f, 0.0f, 1.0f);
builder.vertexUV(1.0f, 0.0f, 0.0f, 1.0f, 1.0f);
builder.vertexUV(1.0f, 1.0f, 0.0f, 1.0f, 0.0f);
builder.vertexUV(0.0f, 1.0f, 0.0f, 0.0f, 0.0f);
builder.end();
// Becomes this:
builder.begin(GL_QUADS, DefaultVertexFormat.POSITION_TEX2_COLOR);
builder.vertex(0.0f, 0.0f, 0.0f).tex(0.0f, 1.0f).tex2(0x00f000f0).color(0xff, 0xff, 0xff, 0xff).endVertex();
builder.vertex(1.0f, 0.0f, 0.0f).tex(1.0f, 1.0f).tex2(0x00f000f0).color(0xff, 0xff, 0xff, 0xff).endVertex();
builder.vertex(1.0f, 1.0f, 0.0f).tex(1.0f, 0.0f).tex2(0x00f000f0).color(0xff, 0xff, 0xff, 0xff).endVertex();
builder.vertex(0.0f, 1.0f, 0.0f).tex(0.0f, 0.0f).tex2(0x00f000f0).color(0xff, 0xff, 0xff, 0xff).endVertex();
builder.end();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment