Answered
Sg type signatures do not match in media projects

While modifying the scenegraph (Sg) in the view-function of my Media.app the signature suddenly does not match!

Expected is ISg<Message> but I only have ISg...

  
Posted 6 months ago
Edited 3 months ago
Votes Newest

Answers


The view function in media expects an ISg<Message>, but ISg is also implemented in Aardvark.Scenegraph.ISg. The types have the same name, but differ slightly, which conflicts with Aardvark.UI.ISg

Sg.noEvents (Aardvark.UI.F# Sg.Sg.noEvents) converts the regular ISg to a ISg<Message>

so your scenegraph looks something like this:

Sg.box (Mod.constant C4b.Green) (Mod.constant Box3d.Unit)
|> Sg.trafo myTrafo
|> Sg.effect effects
......
|> Sg.noEvents
  
Posted 6 months ago
Edited 4 months ago