Skip to content

Create WPF OpenGL applications using F#! This is bare bones template created with dotnet cli so you aren't bound to using Visual Studio only.

License

Notifications You must be signed in to change notification settings

SturdyPose/FSharp-OpenGL-WPF-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create WPF OPENGL apps with F#

As you probably know, GUI and functional programming aren't traditionaly popular together and specially paired with graphics programming. If you're enthuasiast of the mentioned technologies, give this template a go!

Elevator pitch:

Why should you use this template?

  • F# enforces you to write code in a composable and easily testable manner. It's immutable by default, it has beautiful syntax and rich ecosystem as it's part of .NET where you can natively operate with your favorite C# libraries.
  • You get OpenGL canvas inside WPF which you can style however you want.
  • OpenTK and Elmish.WPF are dependencies of this project. You can use it from the get go.
  • Includes simple "Hello triangle" example with Elmish.WPF.
  • Not dependant on IDE. Just use DOTNET CLI.

Building:

View folder is the root of the project.

cd view
dotnet run

After successful build you should see this: Hello opengl view

Potential improvements:

  • Domain Specific Language (DSL) or CLI tool which would generate bindings from XAML to F#
  • Depends on your use case but if you separe OpenGL from WPF in the build phase (Debug build and ship), you can ship it anywhere! (Win, Linux, Mac, Android, etc...)

About

Create WPF OpenGL applications using F#! This is bare bones template created with dotnet cli so you aren't bound to using Visual Studio only.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published