summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2024-02-27 11:09:54 +0100
committerLinus Färnstrand <linus@mullvad.net>2024-02-27 11:09:54 +0100
commit2ca2186fefde0b854dc1b4ae06bf2e8ce92a2336 (patch)
treede024dbfa9343980eb403528ed0e382d594a97a2
parent9a22271c8c5828703a084a5b7d978162403b5335 (diff)
parent2f82e10c45777e958b30cb387380ca0b68007894 (diff)
downloadmullvadvpn-2ca2186fefde0b854dc1b4ae06bf2e8ce92a2336.tar.xz
mullvadvpn-2ca2186fefde0b854dc1b4ae06bf2e8ce92a2336.zip
Merge branch 'optimize-map-contour-lines'
-rw-r--r--android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt4
-rw-r--r--gui/assets/geo/land_contour_indices.binbin873592 -> 392804 bytes
-rw-r--r--gui/assets/geo/land_positions.binbin1006260 -> 1057116 bytes
-rw-r--r--gui/src/renderer/lib/3dmap.ts4
4 files changed, 4 insertions, 4 deletions
diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt
index 379ac407cc..7e862ef59e 100644
--- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt
+++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt
@@ -84,7 +84,7 @@ internal class Globe(resources: Resources) {
landVertexBuffer,
landContour,
colors.contourColorArray,
- GLES20.GL_LINES
+ GLES20.GL_LINE_STRIP
)
// Scale the globe to avoid z-fighting
@@ -153,7 +153,7 @@ internal class Globe(resources: Resources) {
)
companion object {
- private const val LAND_OCEAN_SCALE_FACTOR = 0.9999f
+ private const val LAND_OCEAN_SCALE_FACTOR = 0.99999f
// Vertex, and fragment shader code is taken from Mullvad Desktop 3dmap.ts
private val vertexShaderCode =
diff --git a/gui/assets/geo/land_contour_indices.bin b/gui/assets/geo/land_contour_indices.bin
index dce673a222..37d0460ebe 100644
--- a/gui/assets/geo/land_contour_indices.bin
+++ b/gui/assets/geo/land_contour_indices.bin
Binary files differ
diff --git a/gui/assets/geo/land_positions.bin b/gui/assets/geo/land_positions.bin
index 50c1516184..1e048d6234 100644
--- a/gui/assets/geo/land_positions.bin
+++ b/gui/assets/geo/land_positions.bin
Binary files differ
diff --git a/gui/src/renderer/lib/3dmap.ts b/gui/src/renderer/lib/3dmap.ts
index a39b9e5612..61f86d97b9 100644
--- a/gui/src/renderer/lib/3dmap.ts
+++ b/gui/src/renderer/lib/3dmap.ts
@@ -174,14 +174,14 @@ class Globe {
this.landVertexBuffer,
this.landContourIndexBuffer,
contourColor,
- this.gl.LINES,
+ this.gl.LINE_STRIP,
);
// We scale down to render the land triangles behind/under the country contour lines.
mat4.scale(
globeViewMatrix, // destination matrix
globeViewMatrix, // matrix to scale
- [0.9999, 0.9999, 0.9999], // amount to scale
+ [0.99999, 0.99999, 0.99999], // amount to scale
);
// Draw land triangles.