Skip to content

Commit

Permalink
[GLFW] Remove unused WindowConfig.opengl
Browse files Browse the repository at this point in the history
  • Loading branch information
hyazinthh committed Jul 18, 2024
1 parent 049ffd9 commit 10a09da
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 28 deletions.
3 changes: 0 additions & 3 deletions src/Application/Aardvark.Application.Slim.GL/Application.fs
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,6 @@ type OpenGlApplication private (runtime : Runtime, shaderCachePath : Option<stri
override x.Destroy() =
runtime.Dispose()

override x.CreateGameWindow(config : WindowConfig) =
base.CreateGameWindow { config with opengl = true }

interface IApplication with
member x.Initialize(ctrl : IRenderControl, samples : int) = x.Initialize(ctrl, samples)
member x.Runtime = x.Runtime :> IRuntime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ type VulkanApplication private (app : HeadlessVulkanApplication, hideCocoaMenuBa
override x.Destroy() =
app.Dispose()

override x.CreateGameWindow(config : WindowConfig) =
base.CreateGameWindow { config with opengl = false }

interface IApplication with
member x.Initialize(ctrl : IRenderControl, samples : int) = x.Initialize(ctrl, samples)
member x.Runtime = x.Runtime :> IRuntime
62 changes: 40 additions & 22 deletions src/Application/Aardvark.Application.Slim/GLFW.fs
Original file line number Diff line number Diff line change
Expand Up @@ -359,31 +359,49 @@ type WindowState =

type WindowConfig =
{
title : string
width : int
height : int
focus : bool
resizable : bool
vsync : bool
transparent : bool
opengl : bool
/// Title of the window.
title : string

/// Width of the window content.
width : int

/// Height of the window content.
height : int

/// Desired sample count for the framebuffer.
samples : int

/// Specifies whether the window will be focused when created.
focus : bool

/// Specifies whether the window should be resizable.
resizable : bool

/// Specifies whether v-sync should be enabled.
vsync : bool

/// Specifies whether the framebuffer should be transparent and composited with
/// the background of the window.
transparent : bool

/// Specifies whether to use full resolution framebuffers on Retina displays.
physicalSize : bool
samples : int
stereo : bool

/// Specifies whether to use OpenGL stereoscopic rendering.
stereo : bool
}

static member Default =
{ WindowConfig.title = "Aardvark rocks \\o/"
WindowConfig.width = 1024
WindowConfig.height = 768
WindowConfig.resizable = true
WindowConfig.focus = true
WindowConfig.vsync = true
WindowConfig.opengl = true
WindowConfig.physicalSize = false
WindowConfig.transparent = false
WindowConfig.samples = 1
WindowConfig.stereo = false }
static member Default : WindowConfig =
{ title = "Aardvark rocks \\o/"
width = 1024
height = 768
samples = 1
resizable = true
focus = true
vsync = true
physicalSize = false
transparent = false
stereo = false }

module internal IconLoader =
open System.IO
Expand Down

0 comments on commit 10a09da

Please sign in to comment.