Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

Passing a texture via ID for rendering #2035

Closed schoenobates closed 5 years ago

schoenobates commented 5 years ago

Hello all! I'm looking to render an external texture to a quad (as part of a proof of concept). Currently the framework I'm using provides a texture ID to me and I've been digging around the code to see if this is possible. I've come across GVRExternalTexture but not sure if I'm tackling this in the correct way.

Many thanks in advance.

liaxim commented 5 years ago

Since you are getting the texture name from someplace else you need to use GVRSharedTexture. PR #2036 makes a small change so you can pass GL_TEXTURE_EXTERNAL_OES as the texture type when creating a GVRSharedTexture.

schoenobates commented 5 years ago

That's amazing - thanks ever so much! Do you want me to close this off and reference #2306 ?

liaxim commented 5 years ago

I am glad it works for you. Yes, please close and we will merge the change.