Giter Site home page Giter Site logo

Comments (4)

R1ck77 avatar R1ck77 commented on August 15, 2024

Hi esminis,

since I had your same issue, I have investigated the problem, and it looks like that the reason because the textures are not sampled correctly, is that the cardboard SDK developers have used a texture sampler object, and probably they forgot to unbind it at the start of each stereo renderer callback (this can be verified by checking the OpenGL trace in a the android monitor).

This is especially confusing, as sampler objects are really OpenGL ES 3.0-only features, but some vendors return OpenGL ES3.0 contexts on ES3-capable devices, even if setEGLContextClientVersion (2) is specified (or at least this is true for Qualcomm), as it might be permitted by the method definition.

To be frank, I think behavior can be seriously categorized as a bug, as the sampler object will be used even if the app is created with OpenGL ES2.0 in mind, but running on a OpenGL ES 3.0 capable device (at least a Qualcomm-based one), leaving the app developer no easy way to work around the issue (there is no glBindSampler in GLES20...).

A temporary work around for you could be:

  1. if you are doing OpenGL ES3.x, just be aware of the currently bound sampler, and handle your opengl state accordingly
  2. if you are doing OpenGL ES2.x things get more complicated: you have to check if your current context is really a OpenGL ES3.x context and, only in that case, use some GLES30 functions to turn the sampler object(s) on and off.

Of course this will be required only until the cardboard developers will have fixed the issue (which IMHO would mean unbinding them correctly at the start of each StereoRenderer callback, turning them nicely invisible...).

Hope this helps,
Riccardo

from gvr-android-sdk.

esminis avatar esminis commented on August 15, 2024

I can confirm - I get ES3.x context instead of ES2.x and sampler object is bound...

Thanks Riccardo for solution. I hope this problem gets fixed

from gvr-android-sdk.

oon3m0oo avatar oon3m0oo commented on August 15, 2024

Indeed, when rendering to a context that supports ES3 we use a sampler object, and it wasn't getting cleaned up before calling back to the application. We'll have a fix in the next release that should properly restore the state. Thanks for flagging this!

from gvr-android-sdk.

dav-cz avatar dav-cz commented on August 15, 2024

Closing this issue, since 0.6 update should fix this. @esminis, thanks for the report and please re-open if that's not the case.

from gvr-android-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.