1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-03 13:51:22 +00:00

linewidth bugs fixed when MINIMIZE_GL_CALLS

This commit is contained in:
Zeno Rogue
2019-07-12 23:15:09 +02:00
parent 392611045a
commit d67316454c
2 changed files with 21 additions and 5 deletions

View File

@@ -43,6 +43,7 @@ ld fogbase;
typedef const void *constvoidptr;
constvoidptr current_vertices, buffered_vertices;
ld current_linewidth;
GLuint buf_current, buf_buffered;
@@ -468,6 +469,7 @@ void switch_mode(eMode m, shader_projection sp) {
current_projection[0][0] = -1e8;
}, {});
id_modelview();
current_linewidth = -1;
/* if(current_depthwrite) glDepthMask(GL_TRUE);
else glDepthMask(GL_FALSE);
if(current_depthtest) glEnable(GL_DEPTH_TEST);
@@ -824,6 +826,13 @@ void set_depthwrite(bool b) {
}
}
void set_linewidth(ld lw) {
if(lw != current_linewidth) {
current_linewidth = lw;
glLineWidth(lw);
}
}
void switch_to_text(const vector<glvertex>& v, const vector<glvertex>& t) {
glhr::be_textured();
dynamicval<eModel> pm(pmodel, mdUnchanged);