Created
July 29, 2016 12:24
-
-
Save RSDuck/5f4ca6d8a75fe0af5c9318bf60d5ce07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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