Multiple textures and multiple renderers

in a 2 window and 2 renderers program, is it possible to use a single
texture for both renderers?
or is it possible to use a single renderer for both windows?

thanks
Vittorio

Not right now. I’m thinking that it would be useful to share textures
between renderers, but as far as I know this is only possible on Direct3D as
of Windows Vista, and you still have to have a separate handle to the
texture even when you’re sharing the same resource.

Does anybody know how/if this is possible to set up?On Sun, Feb 13, 2011 at 5:01 AM, Vittorio G. <vitto.giova at yahoo.it> wrote:

in a 2 window and 2 renderers program, is it possible to use a single
texture for both renderers?
or is it possible to use a single renderer for both windows?

thanks
Vittorio


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

You could swap to system memory and back…

or, follow donBerto’s suggestion here:
http://www.devmaster.net/forums/showthread.php?t=7497

Create an OpenGL context for the desktop and change the viewport,
rather than the GL context, for each window. Would involve a lot of
saving/restoring state though, since you’ll probably want a separate
state per renderer.On 13 February 2011 13:12, Sam Lantinga wrote:

Not right now.? I’m thinking that it would be useful to share textures
between renderers, but as far as I know this is only possible on Direct3D as
of Windows Vista, and you still have to have a separate handle to the
texture even when you’re sharing the same resource.

Does anybody know how/if this is possible to set up?

Actually, you could switch that around: bind a new window to an
existing renderer instead of binding a new renderer to a window. So
one renderer could be responsible for multiple windows.

Pretty sure you’re still limited to one context per display device though.On 13 February 2011 14:09, Kenneth Bull <@Kenneth_Bull> wrote:

Create an OpenGL context for the desktop and change the viewport,
rather than the GL context, for each window. ?Would involve a lot of
saving/restoring state though, since you’ll probably want a separate
state per renderer.

Also, this:
(at the bottom)


http://msdn.microsoft.com/en-us/library/ms537565(VS.85).aspxOn 13 February 2011 14:09, Kenneth Bull <@Kenneth_Bull> wrote:

On 13 February 2011 13:12, Sam Lantinga wrote:

Not right now.? I’m thinking that it would be useful to share textures
between renderers, but as far as I know this is only possible on Direct3D as
of Windows Vista, and you still have to have a separate handle to the
texture even when you’re sharing the same resource.

Does anybody know how/if this is possible to set up?

You could swap to system memory and back…

or, follow donBerto’s suggestion here:
http://www.devmaster.net/forums/showthread.php?t=7497

I know it can be done in OpenGL, but can it be done in Direct3D?On Sun, Feb 13, 2011 at 11:33 AM, Kenneth Bull wrote:

On 13 February 2011 14:09, Kenneth Bull wrote:

On 13 February 2011 13:12, Sam Lantinga <@slouken> wrote:

Not right now. I’m thinking that it would be useful to share textures
between renderers, but as far as I know this is only possible on
Direct3D as

of Windows Vista, and you still have to have a separate handle to the
texture even when you’re sharing the same resource.

Does anybody know how/if this is possible to set up?

You could swap to system memory and back…

or, follow donBerto’s suggestion here:
http://www.devmaster.net/forums/showthread.php?t=7497

Also, this:
(at the bottom)
http://stackoverflow.com/questions/452806/multiple-windows-in-opengl
http://msdn.microsoft.com/en-us/library/ms537565(VS.85).aspx


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

There’s this for DirectX 8:
http://www.mvps.org/directx/articles/rendering_to_multiple_windows.htm

Again, you could (probably) use the desktop as the “parent frame”.On 13 February 2011 14:46, Sam Lantinga wrote:

I know it can be done in OpenGL, but can it be done in Direct3D?

I don’t think you can use the desktop. I wonder if you can do this multiple
top level windows anyway. I also wonder what happens if each window is on a
different display, each driven by a different video card.

Hmm, worth looking into, anybody want to volunteer?On Sun, Feb 13, 2011 at 12:08 PM, Kenneth Bull wrote:

On 13 February 2011 14:46, Sam Lantinga <@slouken> wrote:

I know it can be done in OpenGL, but can it be done in Direct3D?

There’s this for DirectX 8:
http://www.mvps.org/directx/articles/rendering_to_multiple_windows.htm

Again, you could (probably) use the desktop as the “parent frame”.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

before the removal of SDL_SetVideoDisplay i had a system with 3 top
level window each on different display (over 2 gpus)
then… only the last window created displayed anything

VittorioOn Sun, Feb 13, 2011 at 10:52 PM, Sam Lantinga wrote:

I don’t think you can use the desktop.? I wonder if you can do this multiple
top level windows anyway.? I also wonder what happens if each window is on a
different display, each driven by a different video card.