Skip to content

Instantly share code, notes, and snippets.

@RSDuck
Created July 29, 2016 12:24
Show Gist options
  • Save RSDuck/5f4ca6d8a75fe0af5c9318bf60d5ce07 to your computer and use it in GitHub Desktop.
Save RSDuck/5f4ca6d8a75fe0af5c9318bf60d5ce07 to your computer and use it in GitHub Desktop.
// When it's this way it flickers with 3D disabled
BufInfo_Init(bufInfo);
for (int i = 0; i < CHUNK_HEIGHT / CHUNK_CLUSTER_HEIGHT; i++)
if (c->data[i].vbo) BufInfo_Add(bufInfo, c->data[0].vbo, sizeof(world_vertex), 3, 0x210);
if (bufInfo->bufCount) C3D_DrawArrays(GPU_TRIANGLES, 0, c->vertexCount);
// But this way the flickering is gone
BufInfo_Init(bufInfo);
for (int i = 0; i < CHUNK_HEIGHT / CHUNK_CLUSTER_HEIGHT; i++) {
if (c->data[i].vbo) BufInfo_Add(bufInfo, c->data[0].vbo, sizeof(world_vertex), 3, 0x210);
if (bufInfo->bufCount) C3D_DrawArrays(GPU_TRIANGLES, 0, c->vertexCount);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment