drop lightmap hack

main
Dominik Madarász 2024-04-11 00:55:14 +02:00
parent b4d410212f
commit 40783980c0
3 changed files with 0 additions and 36 deletions

View File

@ -374051,8 +374051,6 @@ float model_animate(model_t m, float curframe) {
return model_animate_clip(m, curframe, 0, q->numframes-1, true); return model_animate_clip(m, curframe, 0, q->numframes-1, true);
} }
static bool model_lightmap_hook = 0; //@fixme: delete this
static static
void model_draw_call(model_t m, int shader) { void model_draw_call(model_t m, int shader) {
if(!m.iqm) return; if(!m.iqm) return;
@ -374063,12 +374061,6 @@ void model_draw_call(model_t m, int shader) {
renderstate_apply(&m.rs); renderstate_apply(&m.rs);
//@fixme lightmap_bake state hook
if (model_lightmap_hook) {
glDisable(GL_CULL_FACE);
glDisable(GL_BLEND);
}
glBindVertexArray( q->vao ); glBindVertexArray( q->vao );
struct iqmtriangle *tris = NULL; struct iqmtriangle *tris = NULL;
@ -374258,8 +374250,6 @@ void lightmap_bake(lightmap_t *lm, int bounces, void (*drawscene)(lightmap_t *lm
ASSERT(lm->ready); ASSERT(lm->ready);
// @fixme: use xatlas to UV pack all models, update their UV1 and upload them to GPU. // @fixme: use xatlas to UV pack all models, update their UV1 and upload them to GPU.
model_lightmap_hook=1;
int w = lm->w, h = lm->h; int w = lm->w, h = lm->h;
for (int i = 0; i < array_count(lm->models); i++) { for (int i = 0; i < array_count(lm->models); i++) {
model_t *m = lm->models[i]; model_t *m = lm->models[i];
@ -374322,8 +374312,6 @@ void lightmap_bake(lightmap_t *lm, int bounces, void (*drawscene)(lightmap_t *lm
FREE(m->lmdata); m->lmdata = NULL; FREE(m->lmdata); m->lmdata = NULL;
} }
} }
model_lightmap_hook = 0;
} }
#line 0 #line 0

View File

@ -3976,8 +3976,6 @@ float model_animate(model_t m, float curframe) {
return model_animate_clip(m, curframe, 0, q->numframes-1, true); return model_animate_clip(m, curframe, 0, q->numframes-1, true);
} }
static bool model_lightmap_hook = 0; //@fixme: delete this
static static
void model_draw_call(model_t m, int shader) { void model_draw_call(model_t m, int shader) {
if(!m.iqm) return; if(!m.iqm) return;
@ -3988,12 +3986,6 @@ void model_draw_call(model_t m, int shader) {
renderstate_apply(&m.rs); renderstate_apply(&m.rs);
//@fixme lightmap_bake state hook
if (model_lightmap_hook) {
glDisable(GL_CULL_FACE);
glDisable(GL_BLEND);
}
glBindVertexArray( q->vao ); glBindVertexArray( q->vao );
struct iqmtriangle *tris = NULL; struct iqmtriangle *tris = NULL;
@ -4183,8 +4175,6 @@ void lightmap_bake(lightmap_t *lm, int bounces, void (*drawscene)(lightmap_t *lm
ASSERT(lm->ready); ASSERT(lm->ready);
// @fixme: use xatlas to UV pack all models, update their UV1 and upload them to GPU. // @fixme: use xatlas to UV pack all models, update their UV1 and upload them to GPU.
model_lightmap_hook=1;
int w = lm->w, h = lm->h; int w = lm->w, h = lm->h;
for (int i = 0; i < array_count(lm->models); i++) { for (int i = 0; i < array_count(lm->models); i++) {
model_t *m = lm->models[i]; model_t *m = lm->models[i];
@ -4247,7 +4237,5 @@ void lightmap_bake(lightmap_t *lm, int bounces, void (*drawscene)(lightmap_t *lm
FREE(m->lmdata); m->lmdata = NULL; FREE(m->lmdata); m->lmdata = NULL;
} }
} }
model_lightmap_hook = 0;
} }

View File

@ -21143,8 +21143,6 @@ float model_animate(model_t m, float curframe) {
return model_animate_clip(m, curframe, 0, q->numframes-1, true); return model_animate_clip(m, curframe, 0, q->numframes-1, true);
} }
static bool model_lightmap_hook = 0; //@fixme: delete this
static static
void model_draw_call(model_t m, int shader) { void model_draw_call(model_t m, int shader) {
if(!m.iqm) return; if(!m.iqm) return;
@ -21155,12 +21153,6 @@ void model_draw_call(model_t m, int shader) {
renderstate_apply(&m.rs); renderstate_apply(&m.rs);
//@fixme lightmap_bake state hook
if (model_lightmap_hook) {
glDisable(GL_CULL_FACE);
glDisable(GL_BLEND);
}
glBindVertexArray( q->vao ); glBindVertexArray( q->vao );
struct iqmtriangle *tris = NULL; struct iqmtriangle *tris = NULL;
@ -21350,8 +21342,6 @@ void lightmap_bake(lightmap_t *lm, int bounces, void (*drawscene)(lightmap_t *lm
ASSERT(lm->ready); ASSERT(lm->ready);
// @fixme: use xatlas to UV pack all models, update their UV1 and upload them to GPU. // @fixme: use xatlas to UV pack all models, update their UV1 and upload them to GPU.
model_lightmap_hook=1;
int w = lm->w, h = lm->h; int w = lm->w, h = lm->h;
for (int i = 0; i < array_count(lm->models); i++) { for (int i = 0; i < array_count(lm->models); i++) {
model_t *m = lm->models[i]; model_t *m = lm->models[i];
@ -21414,8 +21404,6 @@ void lightmap_bake(lightmap_t *lm, int bounces, void (*drawscene)(lightmap_t *lm
FREE(m->lmdata); m->lmdata = NULL; FREE(m->lmdata); m->lmdata = NULL;
} }
} }
model_lightmap_hook = 0;
} }
#line 0 #line 0