Keeping resources on server side alive

Hi,

 I have an applcation where windows are being opened and closed. Is there a strategy which allows me to keep the resources, like texture objects and VBOs etc, alive while windows are being closed and opened?

Thanks.

OpenGL (ES) resources belong to a GL context. A context is independent of any windows you might create or destroy.

I am developing this application running on CE. From a HWND, I get a HDC, which is used to get an EGLDisplay. Then from which I create an EGLSurface and then EGLContext. So far so good. From another HWND, I get another EGLDisplay, and create a new EGLSurface. Then I tried two things:

  1. Creating a new EGLContext by calling eglCreateContext and passing the existing EGLContext as an argument, and hoping to share the resources. But eglCreateContext fails.
  2. Sharing the EGLContext between two sets of EGLDisplay and EGLSurface. But eglMakeCurrent fails.

Any idea?

I have the answer to myself: EGLDisplay should be shared too.

So this keeps the texture objects open and running?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.