mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-30 02:02:26 +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
|
||||||
|
|
@ -2470,11 +2473,11 @@ void LevelRenderer::renderHitOutline(std::shared_ptr<Player> player,
|
||||||
if (app.GetGameSettings(iPad, eGameSetting_DisplayHUD) == 0) return;
|
if (app.GetGameSettings(iPad, eGameSetting_DisplayHUD) == 0) return;
|
||||||
RenderManager.StateSetLightingEnable(false);
|
RenderManager.StateSetLightingEnable(false);
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
// draw hit outline
|
// draw hit outline
|
||||||
RenderManager.StateSetColour(0.0f, 0.0f, 0.0f, 0.4f);
|
RenderManager.StateSetColour(0.0f, 0.0f, 0.0f, 0.4f);
|
||||||
RenderManager.StateSetLineWidth(1.0f);
|
RenderManager.StateSetLineWidth(1.0f);
|
||||||
|
|
||||||
// hack
|
// hack
|
||||||
glDepthFunc(GL_LEQUAL);
|
glDepthFunc(GL_LEQUAL);
|
||||||
glEnable(GL_POLYGON_OFFSET_LINE);
|
glEnable(GL_POLYGON_OFFSET_LINE);
|
||||||
|
|
@ -2515,25 +2518,37 @@ void LevelRenderer::render(AABB* b) {
|
||||||
glPolygonOffset(-2.0f, -2.0f);
|
glPolygonOffset(-2.0f, -2.0f);
|
||||||
|
|
||||||
// One call please!
|
// One call please!
|
||||||
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);
|
||||||
|
|
@ -4060,7 +4075,7 @@ int LevelRenderer::rebuildChunkThreadProc(void* lpParam) {
|
||||||
|
|
||||||
// app.DebugPrintf("Rebuilding permaChunk %d\n", index + 1);
|
// app.DebugPrintf("Rebuilding permaChunk %d\n", index + 1);
|
||||||
permaChunk[index + 1].rebuild();
|
permaChunk[index + 1].rebuild();
|
||||||
|
|
||||||
// Inform the producer thread that we are done with this chunk
|
// Inform the producer thread that we are done with this chunk
|
||||||
s_rebuildCompleteEvents->Set(index);
|
s_rebuildCompleteEvents->Set(index);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue