mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-09 04:06:44 +00:00
fixed no-GL crash again
This commit is contained in:
parent
a053da7da2
commit
124ee9a467
1
glhr.cpp
1
glhr.cpp
@ -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({
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user