VS fixes
This commit is contained in:
@@ -295,7 +295,7 @@ void MapView3D::draw() {
|
||||
V.rotate(rot.z, 0.0, 0.0, 1.0);
|
||||
V.translate(center.x, center.y, center.z);
|
||||
|
||||
float far = 200; // TODO
|
||||
float farPlane = 200; // TODO
|
||||
|
||||
// projection
|
||||
QMatrix4x4 P;
|
||||
@@ -306,14 +306,14 @@ void MapView3D::draw() {
|
||||
float h = height() / 30;
|
||||
viewport.size.x = w;
|
||||
viewport.size.y = h;
|
||||
P.perspective(45.0f, aspect, 0.01, far);
|
||||
P.perspective(45.0f, aspect, 0.01, farPlane);
|
||||
} else {
|
||||
// default size: 50 * 50/aspect meters
|
||||
float w = 50.0f;
|
||||
float h = 50.0f * height() / width();
|
||||
viewport.size.x = w;
|
||||
viewport.size.y = h;
|
||||
P.ortho(-w, +w, -h, +h, 0.1f, +far);
|
||||
P.ortho(-w, +w, -h, +h, 0.1f, +farPlane);
|
||||
}
|
||||
|
||||
rs.shader->bind();
|
||||
|
||||
Reference in New Issue
Block a user