From 5b52a1d8374a0e700032b5690d9dfd293ca81b72 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 1 Aug 2024 10:50:45 +0200 Subject: [PATCH] [Examples] Make OPC example runnable again --- paket.dependencies | 2 + paket.lock | 51 ++++++++++--------- .../33 - Opc/33 - Opc.fsproj | 1 + src/Examples (netcore)/33 - Opc/Program.fs | 8 ++- .../33 - Opc/paket.references | 15 +----- 5 files changed, 38 insertions(+), 39 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index fe712c7c2..65907471d 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -44,6 +44,8 @@ nuget Silk.NET.Direct3D9 = 2.15.0 nuget SharpZipLib ~> 1.4.1 +nuget Aardvark.PixImage.Pfim ~> 0.9.2 + group Test framework: net6.0 source https://api.nuget.org/v3/index.json diff --git a/paket.lock b/paket.lock index 9a59bc64f..d32df39c0 100644 --- a/paket.lock +++ b/paket.lock @@ -10,58 +10,62 @@ NUGET Aardvark.Base.Runtime (>= 5.2.7 < 5.3) FSharp.Core (>= 5.0) FSharp.Data.Adaptive (>= 1.2.13 < 1.3) - Aardvark.Base (5.2.28) - Aardvark.Base.Telemetry (5.2.28) + Aardvark.Base (5.2.32) + Aardvark.Base.Telemetry (5.2.32) System.Collections.Immutable (>= 5.0) System.Reflection.Metadata (>= 5.0) - restriction: || (== net471) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0-windows7.0) (< netcoreapp3.1)) (== netstandard2.0) System.Text.Json (>= 4.7.2) - Aardvark.Base.Essentials (5.2.28) - Aardvark.Base (5.2.28) + Aardvark.Base.Essentials (5.2.32) + Aardvark.Base (5.2.32) System.Collections.Immutable (>= 5.0) - Aardvark.Base.FSharp (5.2.28) - Aardvark.Base (5.2.28) + Aardvark.Base.FSharp (5.2.32) + Aardvark.Base (5.2.32) Aardvark.Base.TypeProviders (>= 4.5.15 < 4.6) FSharp.Core (>= 5.0) FSharp.Data.Adaptive (>= 1.2 < 1.3) FsPickler (>= 5.3.2 < 5.4) System.Dynamic.Runtime (>= 4.3 < 4.4) - Aardvark.Base.Incremental (5.2.28) - Aardvark.Base (5.2.28) - Aardvark.Base.FSharp (5.2.28) + Aardvark.Base.Incremental (5.2.32) + Aardvark.Base (5.2.32) + Aardvark.Base.FSharp (5.2.32) Aardvark.Base.TypeProviders (>= 4.5.15 < 4.6) FSharp.Core (>= 5.0) FSharp.Data.Adaptive (>= 1.2 < 1.3) FsPickler (>= 5.3.2 < 5.4) - Aardvark.Base.IO (5.2.28) - Aardvark.Base (5.2.28) - Aardvark.Base.Tensors (5.2.28) + Aardvark.Base.IO (5.2.32) + Aardvark.Base (5.2.32) + Aardvark.Base.Tensors (5.2.32) System.Dynamic.Runtime (>= 4.3 < 4.4) - Aardvark.Base.Runtime (5.2.28) - Aardvark.Base.FSharp (5.2.28) - Aardvark.Base.Incremental (5.2.28) + Aardvark.Base.Runtime (5.2.32) + Aardvark.Base.FSharp (5.2.32) + Aardvark.Base.Incremental (5.2.32) Aardvark.Base.TypeProviders (>= 4.5.15 < 4.6) FSharp.Core (>= 5.0) FSharp.Data.Adaptive (>= 1.2 < 1.3) FsPickler (>= 5.3.2 < 5.4) - Aardvark.Base.Telemetry (5.2.28) - Aardvark.Base.Tensors (5.2.28) - Aardvark.Base (5.2.28) - Aardvark.Base.FSharp (5.2.28) + Aardvark.Base.Telemetry (5.2.32) + Aardvark.Base.Tensors (5.2.32) + Aardvark.Base (5.2.32) + Aardvark.Base.FSharp (5.2.32) FSharp.Core (>= 5.0) SixLabors.ImageSharp (>= 2.1.3 < 2.2) Aardvark.Base.TypeProviders (4.5.15) FSharp.Core (>= 3.1.2.5) - restriction: || (== net471) (&& (== net6.0) (>= net45)) (&& (== net6.0-windows7.0) (>= net45)) (&& (== netstandard2.0) (>= net45)) FSharp.Core (>= 4.2.3) - restriction: || (&& (== net471) (< net45)) (== net6.0) (== net6.0-windows7.0) (== netstandard2.0) Aardvark.Build (1.0.21) - Aardvark.Geometry (5.2.28) - Aardvark.Base (5.2.28) - Aardvark.Base.FSharp (5.2.28) - Aardvark.Base.Tensors (5.2.28) + Aardvark.Geometry (5.2.32) + Aardvark.Base (5.2.32) + Aardvark.Base.FSharp (5.2.32) + Aardvark.Base.Tensors (5.2.32) Aardvark.Base.TypeProviders (>= 4.5.15 < 4.6) FSharp.Core (>= 5.0) FSharp.Data.Adaptive (>= 1.2 < 1.3) FsPickler (>= 5.3.2 < 5.4) Unofficial.LibTessDotNet (>= 2.0.2 < 2.1) + Aardvark.PixImage.Pfim (0.9.2) + Aardvark.Base.Tensors (>= 5.2.32 < 5.3) + FSharp.Core (>= 5.0.1) + Pfim (>= 0.11.2 < 0.12) AssimpNet (5.0.0-beta1) NETStandard.Library (>= 1.6.1) - restriction: || (&& (== net471) (< net35)) (== net6.0) (== net6.0-windows7.0) (== netstandard2.0) CommonMark.NET (0.15.1) @@ -142,6 +146,7 @@ NUGET FSharp.Core (>= 4.7) FSys (>= 0.0.1 < 0.1) Newtonsoft.Json (>= 12.0.3) + Pfim (0.11.2) SharpZipLib (1.4.2) System.Memory (>= 4.5.4) - restriction: || (== net471) (&& (== net6.0) (< netstandard2.1)) (&& (== net6.0-windows7.0) (< netstandard2.1)) (== netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.2) - restriction: || (== net471) (&& (== net6.0) (< netstandard2.1)) (&& (== net6.0-windows7.0) (< netstandard2.1)) (== netstandard2.0) diff --git a/src/Examples (netcore)/33 - Opc/33 - Opc.fsproj b/src/Examples (netcore)/33 - Opc/33 - Opc.fsproj index 39ef16347..906991876 100644 --- a/src/Examples (netcore)/33 - Opc/33 - Opc.fsproj +++ b/src/Examples (netcore)/33 - Opc/33 - Opc.fsproj @@ -13,6 +13,7 @@ ..\..\..\bin\Release + diff --git a/src/Examples (netcore)/33 - Opc/Program.fs b/src/Examples (netcore)/33 - Opc/Program.fs index 5023707d0..07bfa68fd 100644 --- a/src/Examples (netcore)/33 - Opc/Program.fs +++ b/src/Examples (netcore)/33 - Opc/Program.fs @@ -181,8 +181,11 @@ type PatchLodTree(globalCenter : V3d, opc : OpcPaths, root : option(Col.Format.RGBA) - with _ -> DefaultTextures.checkerboardPix + try + PixImage.Load(path).ToPixImage(Col.Format.RGBA) + with e -> + Log.error "[Opc] %s" e.Message + DefaultTextures.checkerboardPix let tex = { new INativeTexture with @@ -475,6 +478,7 @@ let main argv = |> Sg.uniform "ProjTrafo" proj |> Sg.uniform "MipMaps" mipMaps |> Sg.uniform "Anisotropic" anisotropic + |> Sg.diffuseTexture' nullTexture |> Sg.viewTrafo views |> Sg.projTrafo proj diff --git a/src/Examples (netcore)/33 - Opc/paket.references b/src/Examples (netcore)/33 - Opc/paket.references index a35625263..180c93249 100644 --- a/src/Examples (netcore)/33 - Opc/paket.references +++ b/src/Examples (netcore)/33 - Opc/paket.references @@ -1,15 +1,2 @@ -Aardvark.Base.Essentials -Aardvark.Base.Incremental -Aardvark.Base.Runtime -AssimpNet FShade.Core -FShade.GLSL -FSharp.Core -Unofficial.Typography -Unofficial.LibTessDotNet -Unofficial.OpenTK - -Unofficial.OpenVR -FShade.Debug -SixLabors.ImageSharp -Aardvark.Build \ No newline at end of file +Aardvark.PixImage.Pfim \ No newline at end of file