Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel IRIS workaround #89

Merged
merged 2 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 5.1.18

- disabled multisampling for text outline - fix for https://github.com/aardvark-platform/aardvark.rendering/issues/86

### 5.1.17
- fixed package dependeny to FSharp.Data.Adaptive
- [Vulkan] fixed package dependency to GLSLangSharp
Expand Down
20 changes: 18 additions & 2 deletions src/Aardvark.Rendering.Text/SceneGraph.fs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,14 @@ module Sg =
let pass = scope.RenderPass
let pass = if pass = RenderPass.main then RenderPass.shapes else pass

shapes.RasterizerState.Multisample <- AVal.map2 (fun a f -> not f || a) aa fill

let multisample =
(aa, fill) ||> AVal.map2 (fun a f ->
// @krauthaufen - why always multisampling when outline only?
not f || a
)

shapes.RasterizerState.Multisample <- multisample
shapes.RenderPass <- if pass = RenderPass.main then RenderPass.shapes else pass
shapes.BlendState.Mode <- AVal.constant BlendMode.Blend
shapes.VertexAttributes <- cache.VertexBuffers
Expand Down Expand Up @@ -364,7 +371,15 @@ module Sg =

let pass = scope.RenderPass
let pass = if pass = RenderPass.main then RenderPass.shapes else pass
shapes.RasterizerState.Multisample <- AVal.map2 (fun a f -> not f || a) aa fill


let multisample =
(aa, fill) ||> AVal.map2 (fun a f ->
// @krauthaufen - why always multisampling when outline only?
not f || a
)

shapes.RasterizerState.Multisample <- multisample
shapes.RenderPass <- pass
shapes.BlendState.Mode <- AVal.constant BlendMode.Blend
shapes.VertexAttributes <- cache.VertexBuffers
Expand All @@ -376,6 +391,7 @@ module Sg =
//shapes.WriteBuffers <- Some (Set.ofList [DefaultSemantic.Colors])

let boundary = RenderObject.ofScope scope
boundary.RasterizerState.Multisample <- multisample
boundary.RenderPass <- pass
boundary.BlendState.Mode <- AVal.constant BlendMode.Blend
boundary.VertexAttributes <- cache.VertexBuffers
Expand Down
25 changes: 13 additions & 12 deletions src/Application/Aardvark.Application.Slim/Window.fs
Original file line number Diff line number Diff line change
Expand Up @@ -199,24 +199,25 @@ module private GameWindowIO =

let mousePos() =
try
match ctrl with
| Some ctrl ->
let state = OpenTK.Input.Mouse.GetCursorState()
let p = ctrl.PointToClient(Drawing.Point(state.X, state.Y))
let s = ctrl.ClientSize
match ctrl with
| Some ctrl ->
let state = OpenTK.Input.Mouse.GetCursorState()
let p = ctrl.PointToClient(Drawing.Point(state.X, state.Y))
let s = ctrl.ClientSize

let x = clamp 0 (s.Width-1) p.X
let y = clamp 0 (s.Height-1) p.Y
let x = clamp 0 (s.Width-1) p.X
let y = clamp 0 (s.Height-1) p.Y

PixelPosition(x, y, ctrl.ClientSize.Width, ctrl.ClientSize.Height)
| _ ->
PixelPosition(0,0,0,0)
with e ->
PixelPosition(x, y, ctrl.ClientSize.Width, ctrl.ClientSize.Height)
| _ ->
PixelPosition(0,0,0,0)
with e ->
Log.warn "could not grab mouse position."
lastPos


let onMouseDownHandler = EventHandler<MouseButtonEventArgs>(fun s e -> this.Down(%%e, %e.Button))

let onMouseDownHandler = EventHandler<MouseButtonEventArgs>(fun s e -> this.Down((%%e), (%e.Button)))
let onMouseUpHandler = EventHandler<MouseButtonEventArgs>(fun s e -> this.Up(%%e, %e.Button))
let onMouseMoveHandler = EventHandler<MouseMoveEventArgs>(fun s e -> this.Move %%e)
let onMouseWheelHandler = EventHandler<MouseWheelEventArgs>(fun s e -> this.Scroll (%%e, (float e.Delta * 120.0)))
Expand Down