Conversation
| #[no_mangle] | ||
| pub extern "C" fn alvr_initialize_opengl() { | ||
| GRAPHICS_CONTEXT.set(Some(Rc::new(GraphicsContext::new_gl()))); | ||
| } |
There was a problem hiding this comment.
cant we call glMakeContext in here itself, since its falloff of wgpu implementation? Also client_core is in android native context also.
There was a problem hiding this comment.
Well, if you end up calling another alvr rendering function right after, the glMakeCurrent call becomes redundant. In alvr_client_openxr instead we call glMakeCurrent just before we need it instead of just after every alvr call.
There was a problem hiding this comment.
I don't want to be too nitpicky, since this C redering API is used only by PhoneVR. So if you request it i can make the glMakeCurrent calls in here. The only place where i can't is when destroying the GRAPHICS_CONTEXT, so you will need to either destroy your gl resources before that call, or call gmMakeCurrent yourself
|
Considering how clippy is complaining you better add the dead code and unused functions lint disable from the server c_api to this |
@ShootingKing-AM Let's merge this once you finished the PhoneVR integration rebase