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

Stickers #1958

Open apjagdale opened 6 years ago

apjagdale commented 6 years ago

Added screenshot capture feature by using 3 Pixel Buffer objects. New class introduced : GVRSticker(GVRContext gvrContext, String tag, long interval)

Methods:

GearVRf DCO signed off by: Abhijit Jagdale a.jagdale@samsung.com

roshanch commented 6 years ago

We are using horizontal/ vertical flip shaders, or post effects just for inverting a scene. we should be modifying mvp instead to rotate or flip the scene instead of all that overhead which is not efficient. Which will also avoid creating unnecessary render targets.

liaxim commented 6 years ago

Couple of tests I believe would be useful. There is a backend adapter that no longer compiles.

liaxim commented 6 years ago

Have you verified screenshotting with all backend adapters?

liaxim commented 6 years ago

What about generating stickers in "headless mode"? Where the framework is only used to render into the images as a background "service"? Should there be all new backend adapter for that mode?

liaxim commented 6 years ago

Looks pretty good overall.

liaxim commented 6 years ago

Needs rebase. Are any of the comments valid?

NolaDonato commented 6 years ago

Please generalize beyond stickers. This should be a component you attach to the Scene object that owns the render target to capture textures.

apjagdale commented 6 years ago

@thomasflynn @NolaDonato In the current approach there is a way to set the interval at which the sticker(screenshot) needs to be captured. So if we move to RenderTarget based approach, onDrawFrame will be called every time. That means no interval but capturing every frame. Do we want interval for RenderTarget approach as well?

NolaDonato commented 6 years ago

Yes that would be useful. We should be able to specify it in terms of frames or seconds

liaxim commented 5 years ago

Should we close?

NolaDonato commented 5 years ago

We still want the feature but it can go into SXR instead of GVRF