You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to port this to GLFW and have a few question regarding the implementation. When defining the observer for Sdl2DestroyWindow the Sdl2Window parameter is marked with [in] and () at the end.
Shouldn't that be [inout] as SDL_DestroyWindow changes the data referenced by the Sdl2Window component?
As far as i understand the parantheses at the end they define an empty predicate that always evaluates to true. So is the expression equivalent to [in] ?flecs.systems.sdl2.window.Window?
If so, why is the Sdl2Window parameter for the SdlDestroyWindow observer marked as optional?
Furthermore i have the problem that GLFW uses callbacks to pass on input events. I tried to pass the ecs_world_t to the callback as a context parameter and used ecs_singleton_get_mut(EcsInput). But then i hit an assert telling me that the world is in readonly mode. How can i modify components from callbacks?
The text was updated successfully, but these errors were encountered:
I am trying to port this to GLFW and have a few question regarding the implementation. When defining the observer for
Sdl2DestroyWindow
theSdl2Window
parameter is marked with[in]
and()
at the end.[inout]
asSDL_DestroyWindow
changes the data referenced by theSdl2Window
component?[in] ?flecs.systems.sdl2.window.Window
?Sdl2Window
parameter for theSdlDestroyWindow
observer marked as optional?Furthermore i have the problem that GLFW uses callbacks to pass on input events. I tried to pass the
ecs_world_t
to the callback as a context parameter and usedecs_singleton_get_mut(EcsInput)
. But then i hit an assert telling me that the world is in readonly mode. How can i modify components from callbacks?The text was updated successfully, but these errors were encountered: