cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.24k stars 7.06k forks source link

GVR - Camera viewport is not reset #17683

Open weiiiiii opened 7 years ago

weiiiiii commented 7 years ago

- cocos2d-x version: 3.14.1

Intro: We are creating a scene that plays a 360 video that can be viewed 1) like other 360 videos in Facebook or Youtube and 2) using vr. To achieve this, we loaded a .csb file containing a sphere (with material and texture). The texture is replaced by video frames when video is played.

Issue in gvr: 1) Switching from vr to non-vr causes image displayed to be displaced towards the right screen capture video 2) vr mode : Texture set on sphere only shows up on a portion of the sphere screen capture video

imtrobin commented 7 years ago

I'm seeing same issues. It seems that GVR changes certain parts and does not reset properly. e.g in CCVRGvrRenderer::render, there is a line 199 which changes camera viewport, and not resetted.

Camera::setDefaultViewport(vp);

weiiiiii commented 7 years ago

No one else is experiencing this issue? I am still needing help on this!!