disable some shaders when they are not needed

This commit is contained in:
laochailan 2017-04-05 15:41:45 +02:00
parent f1fb2e6ad2
commit 516cee005f

View file

@ -655,7 +655,8 @@ static void draw_spellbg(int t) {
if(b->current->type == AT_ExtraSpell)
delay = ATTACK_START_DELAY_EXTRA-ATTACK_START_DELAY;
float f = -(t+delay)/ATTACK_START_DELAY;
draw_wall_of_text(f, b->current->name);
if(f > 0)
draw_wall_of_text(f, b->current->name);
if(t < ATTACK_START_DELAY && b->dialog) {
glPushMatrix();
@ -667,7 +668,10 @@ static void draw_spellbg(int t) {
}
}
static void apply_zoom_shader() {
static void apply_zoom_shader(void) {
if(config_get_int(CONFIG_NO_STAGEBG))
return;
Shader *shader = get_shader("boss_zoom");
glUseProgram(shader->prog);