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
We currently have event handlers for onCreate, onStart, onStop, onPause, and onResume for the MainActivity. The native code has init, step, and stop methods. init is called in MainActivityView.Renderer.onSurfaceChanged, and stop is called in onStop.
There are some issues with this. The native init method initializes the OpenGL state (good), but it also initializes the OSVR server and context (bad). OSVR should be initialized only once in onCreate, and shutdown only once in onDestroy, which we aren't handling at the moment. We should probably do something useful in onPause and onResume, or maybe onStart and onStop? As in, pause the server somehow?
If you look at the serverThread branch, you'll see an implementation using the server thread instead of joint client kit. Notice how the app crashes when you attempt to start the server a second time in the same process, even with a completely new instance of osvr::server::Server.
The text was updated successfully, but these errors were encountered:
We currently have event handlers for
onCreate
,onStart
,onStop
,onPause
, andonResume
for theMainActivity
. The native code hasinit
,step
, andstop
methods.init
is called inMainActivityView.Renderer.onSurfaceChanged
, andstop
is called inonStop
.There are some issues with this. The native
init
method initializes the OpenGL state (good), but it also initializes the OSVR server and context (bad). OSVR should be initialized only once inonCreate
, and shutdown only once inonDestroy
, which we aren't handling at the moment. We should probably do something useful inonPause
andonResume
, or maybeonStart
andonStop
? As in, pause the server somehow?If you look at the
serverThread
branch, you'll see an implementation using the server thread instead of joint client kit. Notice how the app crashes when you attempt to start the server a second time in the same process, even with a completely new instance of osvr::server::Server.The text was updated successfully, but these errors were encountered: