Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cube support. #186

Merged
merged 3 commits into from
Sep 3, 2017
Merged

Add cube support. #186

merged 3 commits into from
Sep 3, 2017

Conversation

gbrlsnts
Copy link
Contributor

By adding cube support we can view very high quality 360 scenarios since OpenGL has a max texture limit. Using one bitmap this texture must be used for all of the 360 while with a cube this limit is applied for each face of the cube. In the example I included you have 2048x2048 faces.

The demo I just copied your examples and added cubemap, so it might be a bit clunky though I just wanted to get the demo up and running.

To use the cubemap you need to set the projection mode to CUBE and use asCubemap like you do for asBitmap and asVideo.

To load each face, onProvideCubemap is executed for each face to be loaded. After all faces loaded onReady is called.

With the example I used Picasso as you already have. In my project I used Glide. Inside onReady in the demo, I called cancelBusy and in my project I use that to hide the overlay on top to hide the loading process and display loading spinners like you do. This allows very good flexibility.

I'm not sure to which branch to push, so I created the request for master.

@ashqal
Copy link
Owner

ashqal commented Aug 28, 2017

Awesome! I will check it ASAP.

@ashqal ashqal changed the base branch from master to dev-m251 September 3, 2017 12:33
@ashqal ashqal merged commit 91189dc into ashqal:dev-m251 Sep 3, 2017
@ashqal
Copy link
Owner

ashqal commented Sep 3, 2017

Thanks for your quality PR.

@gbrlsnts
Copy link
Contributor Author

gbrlsnts commented Sep 3, 2017

Thank you. If you need any change let me know. I will also try to add a minor stuff I have done as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants