# Multiple SDL display windows

**URL:** <https://discourse.libsdl.org/t/multiple-sdl-display-windows/13862>\
**Category:** SDL Development\
**Created:** [September 20, 2006, 12:27pm UTC](https://discourse.libsdl.org/t/multiple-sdl-display-windows/13862 "2006-09-20T12:27:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tnarol](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/7993a0/32.png) [@Tnarol](https://discourse.libsdl.org/u/Tnarol)\
**Post date:** [September 20, 2006, 12:27pm UTC](https://discourse.libsdl.org/t/multiple-sdl-display-windows/13862/1 "2006-09-20T12:27:41Z")

</div>

Hi,

I’d like to know if it is possible to instanciate several SDL display windows  
from the same process. I tried to call several times “SDL\_SetVideoMode” but it  
always gives the same pointer.

I could check it is possible to have several display screens created by  
different processes, it seems to work OK. Are there any restrictions for using  
the SDL.dll in a multiprocessing environment ?

Thanks.

---

<div class="post-metadata">

**Author:** ![Peter\_Mulholland](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/74df32/32.png) [@Peter\_Mulholland](https://discourse.libsdl.org/u/Peter_Mulholland)\
**Post date:** [September 20, 2006, 1:11pm UTC](https://discourse.libsdl.org/t/multiple-sdl-display-windows/13862/2 "2006-09-20T13:11:18Z")

</div>

Hello Tnarol,

Wednesday, September 20, 2006, 1:27:41 PM, you wrote:

> Hi,

> I’d like to know if it is possible to instanciate several SDL display windows  
> from the same process. I tried to call several times “SDL\_SetVideoMode” but it  
> always gives the same pointer.

Under 1.2 no. This is part of 1.3 but that’s in development at the  
moment.

> I could check it is possible to have several display screens created by  
> different processes, it seems to work OK. Are there any restrictions for using  
> the SDL.dll in a multiprocessing environment ?

Should be no restriction on having more than one process open SDL.dll  
but they won’t share any data between them.–  
Best regards,  
Peter mailto:@Peter_Mulholland

---

<div class="post-metadata">

**Author:** ![Tnarol](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/7993a0/32.png) [@Tnarol](https://discourse.libsdl.org/u/Tnarol)\
**Post date:** [September 20, 2006, 3:18pm UTC](https://discourse.libsdl.org/t/multiple-sdl-display-windows/13862/3 "2006-09-20T15:18:37Z")

</div>

> Under 1.2 no. This is part of 1.3 but that’s in development at the  
> moment.

OK. That’s good news.

> Should be no restriction on having more than one process open SDL.dll  
> but they won’t share any data between them.

I didn’t mean to share data between them, I meant problems like concurrent  
access from 2 processes on the same method of the DLL. I don’t know exactly how  
dynamic linking is managed - so my point may be irrelevant if a new process for  
the caller implies a new process for the DLL for instance.

---

<div class="post-metadata">

**Author:** ![Vassilis\_Virvilis](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/vassilis_virvilis/32/487_2.png) [@Vassilis\_Virvilis](https://discourse.libsdl.org/u/Vassilis_Virvilis)\
**Post date:** [September 20, 2006, 3:36pm UTC](https://discourse.libsdl.org/t/multiple-sdl-display-windows/13862/4 "2006-09-20T15:36:38Z")

</div>

Tnarol wrote:

> > Under 1.2 no. This is part of 1.3 but that’s in development at the  
> > moment.
> 
> OK. That’s good news.
> 
> > Should be no restriction on having more than one process open SDL.dll  
> > but they won’t share any data between them.
> 
> I didn’t mean to share data between them, I meant problems like concurrent  
> access from 2 processes on the same method of the DLL. I don’t know exactly how  
> dynamic linking is managed - so my point may be irrelevant if a new process for  
> the caller implies a new process for the DLL for instance.

It is loaded in a different process’ space. Although I don’t have any experience  
with windows I don’t expect any problem of that nature. However if you want to use  
SDL in a non windowed environment like linux fbdev it is possible you will hit some  
problems regarding concurrent access to the same hardware (framebuffer).

```
  .bill

```
