I have one app but 2 diplays. What I want is to display the app on both screens. My graphics driver supports openGL 1.3 and SC Spec 1.0.1
I am using one pbuffer to render my app, but I want to use this pbuffer for multiple displays (which uses the same GPU). Lets say I have 2 displays.
D1, C1 (window context), PB1 (Pbuffer)
D2, C2 (window context), PB2 (Pbuffer)
Firstly for each display, I create a native window, a window surface, a context and make it current then I call eglSwapInterval (*display, 1)
Then I make these calls for initialization:
eglChooseConfig(*display, .., cfg) eglCreatePbufferSurface(*display, *cfg ..) eglCreateContext(*display, *cfg..) eglMakeCurrent (*display, *sfc_Pbuf, *sfc_Pbuf, *ctx_Pbuf ) eglSwapInterval (*display, 1) eglMakeCurrent (*display, ..) // the context on native window glGenTexture(1, &PB1tex) glBindTexture(GL_TEXUTE_2D, PB1tex) glTexParams... . . glTexImage2D(..., 0) glBindTexture(GL_TEXUTE_2D, PB1tex) eglBindTexImage(*display, **sfc_Pbuf, EGL_BACK_BUFFER) --------------------------------- In main: eglMakeCurrent(PB1 Context) myApp // Some GL calls eglMakeCurrent(C1) glBindTexture((GL_TEXUTE_2D, PB1tex)) glBegin(GL_QUADS) glTexCoord2f glVertex2f . . glEnd() eglSwapBuffer(display)
This code is for the case that, Each display uses its own pbuffer (that is created with this display) PB1 for D1 and PB2 for D2.
But I want to use PB1 for D2. While creating C1 and C2, I open texture sharing property (which is supported by my graphics driver) But I see a black screen. Is there a resolution to do what I want?