[SDL] [SDL 1.3] Create Opengl Context without window?
Patrick Baggett
baggett.patrick at gmail.com
Wed Feb 8 09:02:55 PST 2012
That's tricky. I know on Windows you can use one context to render to two
different windows if they have the exact same pixel format, and I'm fairly
certain an analogous situation occurs on X windows (I haven't explicitly
tried, but two windows with the same X visual probably would work), but I
can't comment on OS X.
If you're doing GPGPU, why not give OpenCL a look?
On Wed, Feb 8, 2012 at 10:44 AM, mercurio7891 <jianann87 at gmail.com> wrote:
> **
> Hi, I am trying to use opengl for General purpose computation (GPGPU), on
> multiple windows.
>
> Thus I was trying to decouple the context from the window as windows can
> be created and disappear at anytime
>
> Anyway if the context is tied to the window, I was wondering if the opengl
> context are transferable to other windows? (All windows are rendered on the
> main thread)
>
> Suppose the scenario below will it work?
>
> e.g:
>
>
>
> Code:
>
>
> Create Window_A;
> Create Opengl Context (Context_A) from Window_A;
> Create Window_B;
> Render Window_A (SDL_GL_MakeCurrent)
> Render Window_B (SDL_GL_MakeCurrent)
> ...
> ...
> Sometime later destroy Window_A (SDL_DestroyWindow)
> **** Is Context_A still valid after Window_A is destroyed? i.e. can
> Window_B still continue to use Context_A via SDL_GL_MakeCurrent? ****
>
>
>
>
> regards
> [/code]
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120208/6572624f/attachment.htm>
More information about the SDL
mailing list