From e2548e8eb07735d8ee4c21154ca938b9dd4d1fa6 Mon Sep 17 00:00:00 2001
From: Matthias Betz <matthias.betz@hft-stuttgart.de>
Date: Wed, 11 May 2022 15:05:23 +0200
Subject: [PATCH] add start shell script remove version requirement for opengl

---
 src/assembly/assembly.xml                                   | 1 +
 src/assembly/start.sh                                       | 3 +++
 .../java/de/hft/stuttgart/citygml/viewer/CityGMLViewer.java | 6 +++---
 3 files changed, 7 insertions(+), 3 deletions(-)
 create mode 100644 src/assembly/start.sh

diff --git a/src/assembly/assembly.xml b/src/assembly/assembly.xml
index e951e64..d041514 100644
--- a/src/assembly/assembly.xml
+++ b/src/assembly/assembly.xml
@@ -30,6 +30,7 @@
 				<include>start.bat</include>
 				<include>color.properties</include>
 				<include>colorMappings.csv</include>
+				<include>start.sh</include>
 			</includes>
 			<filtered>true</filtered>
 		</fileSet>
diff --git a/src/assembly/start.sh b/src/assembly/start.sh
new file mode 100644
index 0000000..9e1bd53
--- /dev/null
+++ b/src/assembly/start.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+javaw -jar ${project.artifactId}-${project.version}.jar
\ No newline at end of file
diff --git a/src/main/java/de/hft/stuttgart/citygml/viewer/CityGMLViewer.java b/src/main/java/de/hft/stuttgart/citygml/viewer/CityGMLViewer.java
index 8e6fce0..a1a5e6d 100644
--- a/src/main/java/de/hft/stuttgart/citygml/viewer/CityGMLViewer.java
+++ b/src/main/java/de/hft/stuttgart/citygml/viewer/CityGMLViewer.java
@@ -202,7 +202,7 @@ public class CityGMLViewer {
 		if (!GLFW.glfwInit()) {
 			throw new IllegalStateException("Unable to initialize GLFW");
 		}
-		String title = "CityGMLViewer";
+		String title = "CityGMLViewer" + f.getName();
 
 		GLFW.glfwDefaultWindowHints(); // Loads GLFW's default window settings
 		if (useDebug) {
@@ -210,8 +210,8 @@ public class CityGMLViewer {
 		}
 		GLFW.glfwWindowHint(GLFW.GLFW_VISIBLE, GLFW.GLFW_FALSE); // Sets window to be visible
 		GLFW.glfwWindowHint(GLFW.GLFW_RESIZABLE, GLFW.GLFW_TRUE); // Sets whether the window is resizable
-		GLFW.glfwWindowHint(GLFW.GLFW_CONTEXT_VERSION_MAJOR, 3);
-		GLFW.glfwWindowHint(GLFW.GLFW_CONTEXT_VERSION_MINOR, 0);
+//		GLFW.glfwWindowHint(GLFW.GLFW_CONTEXT_VERSION_MAJOR, 3);
+//		GLFW.glfwWindowHint(GLFW.GLFW_CONTEXT_VERSION_MINOR, 0);
 		GLFW.glfwWindowHint(GLFW.GLFW_SAMPLES, 2);
 
 		windowId = GLFW.glfwCreateWindow(width, height, title, 0, 0);
-- 
GitLab