1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-15 10:38:06 +00:00

rewritten the embeddings more nicely

This commit is contained in:
Zeno Rogue
2023-01-27 00:27:10 +01:00
parent 8744420504
commit 85dffdbeff
28 changed files with 1148 additions and 1090 deletions

View File

@@ -450,7 +450,7 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
if(shader_flags & GF_NO_FOG) {
vmain += "// no fog used\n";
}
else if(GDIM == 3 && WDIM == 2 && hyperbolic && context_fog && geom3::same_in_same() && pmodel == mdPerspective) {
else if(GDIM == 3 && WDIM == 2 && hyperbolic && context_fog && cgi.emb->is_same_in_same() && pmodel == mdPerspective) {
vsh +=
"uniform mediump mat4 uRadarTransform;\n"
"uniform mediump sampler2D tAirMap;\n"
@@ -582,7 +582,7 @@ void display_data::set_projection(int ed, ld shift) {
if(sol && solv_all) id |= 1;
if(in_h2xe()) id |= 1;
if(in_s2xe()) id |= 2;
if(WDIM == 2 && GDIM == 3 && hyperbolic && context_fog && geom3::same_in_same()) id |= 1;
if(WDIM == 2 && GDIM == 3 && hyperbolic && context_fog && cgi.emb->is_same_in_same()) id |= 1;
shared_ptr<glhr::GLprogram> selected;
if(matched_programs.count(id)) selected = matched_programs[id];