Jump to content

Native SDK: OpenGL shared context


KOS

Recommended Posts

Hi ,

 

It would be nice if you can describe the use case more. It's important to know why you need “init renderer with a shared OpenGL context?” Maybe there is alternative way that does not need “init renderer with a shared OpenGL context”.

Thanks.

Link to comment
Share on other sites

 

I am embedding WaveVR's rendering pipeline into some existing Graphics infrastructure.

There is already OpenGL context and it is hard to share WaveVR's OpenGL context to it.

 

The reason is that I've already have left and right textures (for left and right eye) without distortion (WVR_GetTransformFromEyeToHead and WVR_GetProjection used).

I just want to put this textures to "vertex displacement" mesh that is used in WVR (I think so) with

WVR_SubmitFrame call inside my OpenGL context.

 

 

NOTE:

super.setUsingRenderBaseActivity(false);

inside my Activity

Link to comment
Share on other sites

Hi  ,

 

We need more information to make sure how can we support this item.

 

1. What is the target layer of the support, Java or Native?

2. Does this means WaveVR also needs to render the content to the EGLSurface provide by the existing Graphics infrastructure ? 

Or the existing Graphics infrastructure can render in off-screen mode so that the WaveVR can render to its own surface and show on the screen correctly?

Thanks.

Link to comment
Share on other sites


 wrote:

Hi  ,

 

We need more information to make sure how can we support this item.

 

1. What is the target layer of the support, Java or Native?

 

The short answer is "
Mostly
Native"

Long answer:

End user application is
Java + Native
just like WaveVR's
hellovr
example with is't own Activity (inherited from VRActivity) and SurfaceView.

SurfaceView calls
native
methods for OpenGL context creation (uses it's own ANativeWindow to create EGLSurface)

 

2. Does this means WaveVR also needs to render the content to the EGLSurface provide by the existing Graphics infrastructure ? 

YES

 

Or the existing Graphics infrastructure can render in off-screen mode so that the WaveVR can render to its own surface and show on the screen correctly?

 

It's harder to implement.

 

Thanks.

Thanks!

 

Link to comment
Share on other sites

Hi  ,

 

So far we do not have share context mechanism for developer, we will plan to use the context created by developer in the future. It may useful for your case. 

However, we would like to know what the “Graphics infrastructure” you mentioned is? A kind of game engine or sample apk with source code? Then we can check if there is a better way to achieve the goal.

 

Based on the pervious info, using runtime’s context as shared context or copy existed image data from your texture to runtime texture are the compromise so far.

Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...