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

black screen is rendered when VREffects script is not used with webvr-polyfill #341

Closed
iambumblehead opened this issue Mar 15, 2019 · 3 comments

Comments

@iambumblehead
Copy link

Description:

Per discussion in this ticket, I removed VREffects from an application that uses webvr-polyfill and now a black screen appears in VR mode.

Many of these appear in the debug window console,

[.WebGL-0x7fa64b0c3400]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete

And finally

WebGL: too many errors, no more errors will be reported to the console for this context.

The relevant part of my script looks like this...

    getVReffect ( canvas, renderer ) {
        let parentelem = canvas.parentElement;
        let [ w, h ] = [ parentelem.offsetWidth, parentelem.offsetHeight ];

        // let effect = new THREE.VREffect( renderer );
        // effect.setSize( w, h );
        // effect.renderer = renderer;
        // return effect;

       renderer.vr.enabled = true
       renderer.setSize( w, h )
       renderer.renderer = renderer;

       return renderer;
    }
Additional Information:
  • webvr-polyfill version: 0.10.10
  • Browser name/version/release channel: Chrome 72.0.3626.105
  • Operating System: Samsung
@iambumblehead
Copy link
Author

iambumblehead commented Mar 15, 2019

I am aware of native VR support, but want to continue using the polyfill for unsupported environments.

If you know of an example somewhere that uses webvr-polyfill without VREffects that would be useful for me.

@iambumblehead
Copy link
Author

Actually, this is working when I use the WebVR script in the three.js libraries --nice :)

       renderer.vr.enabled = true
       renderer.setSize( w, h )
       renderer.renderer = renderer;

       document.getElementById('three-container').appendChild( WEBVR.createButton( renderer ) );

       return renderer;

@jsantell
Copy link
Contributor

Great to hear you got it working!

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

No branches or pull requests

2 participants