mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-30 05:52:23 +00:00
docs: add FIXME for clipChunk translation
This commit is contained in:
parent
d53831186e
commit
35d92fe504
|
|
@ -858,6 +858,9 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) {
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
|
// 4jcraft: added this. On OpenGL 2.1 this breaks, but the 3.3 renderer
|
||||||
|
// requires it.
|
||||||
|
// FIXME: find a way to get rid of this.
|
||||||
glTranslatef((float)pClipChunk->chunk->x, (float)pClipChunk->chunk->y,
|
glTranslatef((float)pClipChunk->chunk->x, (float)pClipChunk->chunk->y,
|
||||||
(float)pClipChunk->chunk->z);
|
(float)pClipChunk->chunk->z);
|
||||||
// List can be calculated directly from the chunk's global idex
|
// List can be calculated directly from the chunk's global idex
|
||||||
|
|
@ -2518,22 +2521,34 @@ void LevelRenderer::render(AABB* b) {
|
||||||
t->begin(GL_LINES);
|
t->begin(GL_LINES);
|
||||||
|
|
||||||
// Bottom
|
// Bottom
|
||||||
t->vertex(b->x0, b->y0, b->z0); t->vertex(b->x1, b->y0, b->z0);
|
t->vertex(b->x0, b->y0, b->z0);
|
||||||
t->vertex(b->x1, b->y0, b->z0); t->vertex(b->x1, b->y0, b->z1);
|
t->vertex(b->x1, b->y0, b->z0);
|
||||||
t->vertex(b->x1, b->y0, b->z1); t->vertex(b->x0, b->y0, b->z1);
|
t->vertex(b->x1, b->y0, b->z0);
|
||||||
t->vertex(b->x0, b->y0, b->z1); t->vertex(b->x0, b->y0, b->z0);
|
t->vertex(b->x1, b->y0, b->z1);
|
||||||
|
t->vertex(b->x1, b->y0, b->z1);
|
||||||
|
t->vertex(b->x0, b->y0, b->z1);
|
||||||
|
t->vertex(b->x0, b->y0, b->z1);
|
||||||
|
t->vertex(b->x0, b->y0, b->z0);
|
||||||
|
|
||||||
// Top
|
// Top
|
||||||
t->vertex(b->x0, b->y1, b->z0); t->vertex(b->x1, b->y1, b->z0);
|
t->vertex(b->x0, b->y1, b->z0);
|
||||||
t->vertex(b->x1, b->y1, b->z0); t->vertex(b->x1, b->y1, b->z1);
|
t->vertex(b->x1, b->y1, b->z0);
|
||||||
t->vertex(b->x1, b->y1, b->z1); t->vertex(b->x0, b->y1, b->z1);
|
t->vertex(b->x1, b->y1, b->z0);
|
||||||
t->vertex(b->x0, b->y1, b->z1); t->vertex(b->x0, b->y1, b->z0);
|
t->vertex(b->x1, b->y1, b->z1);
|
||||||
|
t->vertex(b->x1, b->y1, b->z1);
|
||||||
|
t->vertex(b->x0, b->y1, b->z1);
|
||||||
|
t->vertex(b->x0, b->y1, b->z1);
|
||||||
|
t->vertex(b->x0, b->y1, b->z0);
|
||||||
|
|
||||||
// Vertical
|
// Vertical
|
||||||
t->vertex(b->x0, b->y0, b->z0); t->vertex(b->x0, b->y1, b->z0);
|
t->vertex(b->x0, b->y0, b->z0);
|
||||||
t->vertex(b->x1, b->y0, b->z0); t->vertex(b->x1, b->y1, b->z0);
|
t->vertex(b->x0, b->y1, b->z0);
|
||||||
t->vertex(b->x1, b->y0, b->z1); t->vertex(b->x1, b->y1, b->z1);
|
t->vertex(b->x1, b->y0, b->z0);
|
||||||
t->vertex(b->x0, b->y0, b->z1); t->vertex(b->x0, b->y1, b->z1);
|
t->vertex(b->x1, b->y1, b->z0);
|
||||||
|
t->vertex(b->x1, b->y0, b->z1);
|
||||||
|
t->vertex(b->x1, b->y1, b->z1);
|
||||||
|
t->vertex(b->x0, b->y0, b->z1);
|
||||||
|
t->vertex(b->x0, b->y1, b->z1);
|
||||||
|
|
||||||
t->end();
|
t->end();
|
||||||
glDisable(GL_POLYGON_OFFSET_LINE);
|
glDisable(GL_POLYGON_OFFSET_LINE);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue