GodotVR / godot_oculus_mobile

Godot Oculus mobile drivers (Oculus Go / Oculus Quest)
MIT License
170 stars 34 forks source link

Remove unused framebuffer code #48

Closed NeoSpark314 closed 5 years ago

NeoSpark314 commented 5 years ago

Hi,

this pull request is a proposal for removing some currently unused code to make the plugin easier to maintain. During my last debugging (searching for the controller latency problem) of the godot_oculus_mobile plugin I noticed that the opengl framebuffer setup in framebuffer.cpp is not used and also not needed. It will just use gpu resources for the unused MSAA zbuffers that are created. From what I can tell so far godot has an internal setup of the target gl framebuffer for rendering and uses only the target color texture from the swap chain that is created via the VrApi. This is also the reason why setting MSAA inside the godot_oculus_mobile plugin has no effect.

I also think multiviewsupport will need some changes to the ARVR api; this is the reason why I removed this setup code from the framebuffer.cpp as it is currently not functional.

The final commit is some small cleanup and renaming of the functions inside framebuffer.h to be more consistent with ovr_mobile_session.h

m4gr3d commented 5 years ago

Looks good! Can you squash the commits then it should be good to merge.

Thanks for the cleanup!

NeoSpark314 commented 5 years ago

Squashed them. Thanks for the fast response.