Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Multiple Window Rendering using same texture buffer in same Application

  1. #1

    Multiple Window Rendering using same texture buffer in same Application

    Hey hi ,
    I have a Scenario , where

    I created first window and initialized the OpenGL 3.3 Context and i'm able to render the texture on Window,

    but now I have Created another second window with OpenGL initialized , so it's having it's own HDC, HGLRC and HWND so i want to use the texture buffer from first window , to render in second window.

    it's running in Same process ,

    first window rendering with its own HGLRC , HWND and HDC,
    but now the texture loaded by first window to texture buffer , i have to reuse in second window which having it's own HGLRC , HWND and HDC,

    how do i share texture buffer between two rendering contexts within same process but between different threads , in which all thread have capabilities to render
    on it's own window.

    so here every window have it's own Opengl initialization for context , and can able to render on its own window
    problem to solve is to share the texture between these two rendering threads which render same texture buffer .

  2. #2

  3. #3

    FIXING MULTI-MONITOR AND MULTI-WINDOW OPENGL ON WINDOWS Not able to find wglAcquireD

    hello,
    i found this link : https://caseymuratori.com/blog_0026

    but i was unable to found below two functions in wgl

    CGLuint wglAcquireDCFramebuffer(HDC hDC);
    void wglReleaseDCFramebuffer(HDC hDC, CGLuint framebuffer);

    even they dint have any documentation for wglAcquireDCFramebuffer and wglReleaseDCFramebuffer.

    please can anyone tell me, what are they ,even they exist also ?
    sicne in caseymuratori.com , he has stated to fix multiple monitor and multiple window

  4. #4
    i looked through above links , but all they describe to wglmakecurrent every time per context for different window rendering .
    but i have two different context in two thread and how should i share the texture buffer from main rendering thread to child rendering thread,
    both thread render on it's own window,
    but the main thread upload the :->data to PBO :->create texture :-> and Render,
    but the,
    tchild window should able to acess the texture buffer created by main rendering thread just to render on its window.

  5. #5
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,569
    Quote Originally Posted by suryawanshi.praveen007 View Post
    i looked through above links , ... but i have two different context in two thread and how should i share the texture buffer from main rendering thread to child rendering thread,
    Yes, exactly. Why can't you create two contexts that share GL objects using either:

    1. The "hShareContext" argument of wglCreateContextAttribsARB(), OR
    2. Calling wglShareLists() immediately after creating the two contexts?

    That's why I pointed you to those links. Sorry it wasn't obvious.

    Just be sure to create and share your contexts first. Then create GL objects through them.
    Last edited by Dark Photon; 11-29-2018 at 05:48 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •