diff --git a/glhr.cpp b/glhr.cpp index da4fe0dc..e23d454f 100644 --- a/glhr.cpp +++ b/glhr.cpp @@ -485,6 +485,7 @@ EX void full_enable(shared_ptr 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({ diff --git a/shaders.cpp b/shaders.cpp index 301794e1..cbe6d2f6 100644 --- a/shaders.cpp +++ b/shaders.cpp @@ -286,7 +286,7 @@ shared_ptr 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))