mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
disabled set_depthwrite since it has weird results
This commit is contained in:
parent
1573c0daef
commit
e5d6278ab1
14
shaders.cpp
14
shaders.cpp
@ -25,6 +25,8 @@ namespace glhr {
|
|||||||
|
|
||||||
bool glew = false;
|
bool glew = false;
|
||||||
|
|
||||||
|
bool current_depthtest, current_depthwrite;
|
||||||
|
|
||||||
typedef const void *constvoidptr;
|
typedef const void *constvoidptr;
|
||||||
|
|
||||||
constvoidptr current_vertices, buffered_vertices;
|
constvoidptr current_vertices, buffered_vertices;
|
||||||
@ -456,6 +458,10 @@ void switch_mode(eMode m, shader_projection sp) {
|
|||||||
current_modelview[0][0] = -1e8;
|
current_modelview[0][0] = -1e8;
|
||||||
current_projection[0][0] = -1e8;
|
current_projection[0][0] = -1e8;
|
||||||
id_modelview();
|
id_modelview();
|
||||||
|
/* if(current_depthwrite) glDepthMask(GL_TRUE);
|
||||||
|
else glDepthMask(GL_FALSE);
|
||||||
|
if(current_depthtest) glEnable(GL_DEPTH_TEST);
|
||||||
|
else glDisable(GL_DEPTH_TEST); */
|
||||||
}
|
}
|
||||||
|
|
||||||
void fog_max(ld fogmax) {
|
void fog_max(ld fogmax) {
|
||||||
@ -772,8 +778,6 @@ void store_in_buffer(vector<glvertex>& v) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool current_depthtest;
|
|
||||||
|
|
||||||
void set_depthtest(bool b) {
|
void set_depthtest(bool b) {
|
||||||
if(b != current_depthtest) {
|
if(b != current_depthtest) {
|
||||||
current_depthtest = b;
|
current_depthtest = b;
|
||||||
@ -783,14 +787,12 @@ void set_depthtest(bool b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool current_depthwrite;
|
|
||||||
|
|
||||||
void set_depthwrite(bool b) {
|
void set_depthwrite(bool b) {
|
||||||
if(b != current_depthwrite) {
|
/*if(b != current_depthwrite) { <- this does not work ask intended for some reason...
|
||||||
current_depthwrite = b;
|
current_depthwrite = b;
|
||||||
if(b) glDepthMask(GL_TRUE);
|
if(b) glDepthMask(GL_TRUE);
|
||||||
else glDepthMask(GL_FALSE);
|
else glDepthMask(GL_FALSE);
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user