Skip to content

Commit

Permalink
dotnetUno: Remove openGL flags from launch.json
Browse files Browse the repository at this point in the history
Uno Platform does not support openGL ES 2.0, so does not make
sense to have this flags in launch.json for now.

Related-to: #51
Signed-off-by: Matheus Castello <matheus.castello@toradex.com>

diff --git a/dotnetUno/.vscode/launch.json b/dotnetUno/.vscode/launch.json
index 7617fed..f6c304e 100644
--- a/dotnetUno/.vscode/launch.json
+++ b/dotnetUno/.vscode/launch.json
@@ -8,7 +8,7 @@
       // Use IntelliSense to find out which attributes exist for C# debugging
       // Use hover for the description of the existing attributes
       // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
-      "name": "Skia.GTK openGL",
+      "name": "Debug Local",
       "type": "coreclr",
       "request": "launch",
       "preLaunchTask": "build-torizon-local",
@@ -18,28 +18,6 @@
       "env": {
         "DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
         "GDK_BACKEND": "x11",
-        "UNO_DISABLE_OPENGL": "false",
-        "UNO_FULLSCREEN": "false"
-      },
-      "cwd": "${workspaceFolder}/__change__.Skia.Gtk",
-      // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
-      "console": "internalConsole",
-      "stopAtEntry": false
-    },
-    {
-      // Use IntelliSense to find out which attributes exist for C# debugging
-      // Use hover for the description of the existing attributes
-      // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
-      "name": "Skia.GTK noGL",
-      "type": "coreclr",
-      "request": "launch",
-      "preLaunchTask": "build-torizon-local",
-      // If you have changed target frameworks, make sure to update the program path.
-      "program": "${workspaceFolder}/__change__.Skia.Gtk/bin/Debug/net6.0/__change__.Skia.Gtk.dll",
-      "args": [],
-      "env": {
-        "DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
-        "UNO_DISABLE_OPENGL": "true",
         "UNO_FULLSCREEN": "false"
       },
       "cwd": "${workspaceFolder}/__change__.Skia.Gtk",
@@ -58,8 +36,6 @@
       "env": {
         "DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
         //"GDK_BACKEND": "x11",
-        //"GDK_GL": "gles",
-        "UNO_DISABLE_OPENGL": "true",
         "UNO_FULLSCREEN": "true"
       },
       "args": [],
@@ -94,7 +70,6 @@
       "env": {
         "DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
         // "GDK_BACKEND": "x11",
-        "UNO_DISABLE_OPENGL": "true",
         "UNO_FULLSCREEN": "true"
       },
       "args": [],
@@ -130,7 +105,6 @@
         "DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
         //"GDK_BACKEND": "x11",
         //"GDK_GL": "gles",
-        "UNO_DISABLE_OPENGL": "true",
         "UNO_FULLSCREEN": "true"
       },
       "args": [],
diff --git a/dotnetUno/__change__.Skia.Gtk/Program.cs b/dotnetUno/__change__.Skia.Gtk/Program.cs
index caf2e7d..cca7b89 100644
--- a/dotnetUno/__change__.Skia.Gtk/Program.cs
+++ b/dotnetUno/__change__.Skia.Gtk/Program.cs
@@ -15,16 +15,8 @@ namespace __change__.Skia.Gtk
 			};

 			var host = new GtkHost(() => new App(), args);
-
-			if (!Environment.GetEnvironmentVariable("UNO_DISABLE_OPENGL")
-				.Equals("true"))
-			{
-				host.RenderSurfaceType = RenderSurfaceType.OpenGL;
-			}
-			else
-			{
-				host.RenderSurfaceType = RenderSurfaceType.Software;
-			}
+			// FIXME: if your machine supports openGL remove this
+			host.RenderSurfaceType = RenderSurfaceType.Software;

 			host.Run();
 		}
  • Loading branch information
microhobby committed Jun 13, 2023
1 parent 3184dc2 commit 5be367b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
28 changes: 1 addition & 27 deletions dotnetUno/.vscode/launch.json
Expand Up @@ -8,7 +8,7 @@
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": "Skia.GTK openGL",
"name": "Debug Local",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-torizon-local",
Expand All @@ -18,28 +18,6 @@
"env": {
"DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
"GDK_BACKEND": "x11",
"UNO_DISABLE_OPENGL": "false",
"UNO_FULLSCREEN": "false"
},
"cwd": "${workspaceFolder}/__change__.Skia.Gtk",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": "Skia.GTK noGL",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-torizon-local",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/__change__.Skia.Gtk/bin/Debug/net6.0/__change__.Skia.Gtk.dll",
"args": [],
"env": {
"DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
"UNO_DISABLE_OPENGL": "true",
"UNO_FULLSCREEN": "false"
},
"cwd": "${workspaceFolder}/__change__.Skia.Gtk",
Expand All @@ -58,8 +36,6 @@
"env": {
"DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
//"GDK_BACKEND": "x11",
//"GDK_GL": "gles",
"UNO_DISABLE_OPENGL": "true",
"UNO_FULLSCREEN": "true"
},
"args": [],
Expand Down Expand Up @@ -94,7 +70,6 @@
"env": {
"DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
// "GDK_BACKEND": "x11",
"UNO_DISABLE_OPENGL": "true",
"UNO_FULLSCREEN": "true"
},
"args": [],
Expand Down Expand Up @@ -130,7 +105,6 @@
"DOTNET_MODIFIABLE_ASSEMBLIES": "debug",
//"GDK_BACKEND": "x11",
//"GDK_GL": "gles",
"UNO_DISABLE_OPENGL": "true",
"UNO_FULLSCREEN": "true"
},
"args": [],
Expand Down
12 changes: 2 additions & 10 deletions dotnetUno/__change__.Skia.Gtk/Program.cs
Expand Up @@ -15,16 +15,8 @@ static void Main(string[] args)
};

var host = new GtkHost(() => new App(), args);

if (!Environment.GetEnvironmentVariable("UNO_DISABLE_OPENGL")
.Equals("true"))
{
host.RenderSurfaceType = RenderSurfaceType.OpenGL;
}
else
{
host.RenderSurfaceType = RenderSurfaceType.Software;
}
// FIXME: if your machine supports openGL remove this
host.RenderSurfaceType = RenderSurfaceType.Software;

host.Run();
}
Expand Down

0 comments on commit 5be367b

Please sign in to comment.