1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-28 07:59:04 +00:00

some work on 3D view

This commit is contained in:
?
2019-02-21 18:46:53 +01:00
committed by Zeno Rogue
parent a3eb161235
commit e73d2f2f22
12 changed files with 118 additions and 59 deletions

View File

@@ -235,7 +235,7 @@ void display_data::set_projection(int ed, bool apply_models) {
}
else {
if(hyperbolic && vid.alpha > -1) {
if(hyperbolic && vid.alpha > -1 && DIM == 2) {
// Because of the transformation from H3 to the Minkowski hyperboloid,
// points with negative Z can be generated in some 3D settings.
// This happens for points below the camera, but above the plane.
@@ -299,7 +299,7 @@ void display_data::set_viewport(int ed) {
}
bool model_needs_depth() {
return pmodel == mdBall;
return DIM == 3 || pmodel == mdBall;
}
void setGLProjection(color_t col) {