fixed no-GL crash again

This commit is contained in:
Zeno Rogue 2020-03-05 22:35:06 +01:00
parent a053da7da2
commit 124ee9a467
2 changed files with 2 additions and 1 deletions

View File

@ -485,6 +485,7 @@ EX void full_enable(shared_ptr<GLprogram> p) {
auto& cur = current_glprogram;
flagtype oldflags = cur ? cur->shader_flags : 0;
if(p == cur) return;
if(!vid.usingGL) return;
cur = p;
GLERR("pre_switch_mode");
WITHSHADER({

View File

@ -286,7 +286,7 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
vsh += varying;
vsh += vmain;
if(glhr::noshaders) fsh = vsh = "";
if(glhr::noshaders || !vid.usingGL) fsh = vsh = "";
string both = fsh + "*" + vsh + "*" + its(shader_flags);
if(compiled_programs.count(both))