2 screens ?

Blitz3D Forums/Blitz3D Programming/2 screens ?

Avatara(Posted 2003) [#1]
it's possible to generate 2 differents (no clone) screens with Blitz ?
For example with 2 graphics cards

someone have already try it ?


darklordz(Posted 2003) [#2]
What do you mean like 2 Viewports? Each asigned to 2 different camera's????


Koriolis(Posted 2003) [#3]
If he says "For example with 2 graphics cards" he probably means two monitors, a thing that many new cards can even handle directly (isn't that called "dual view" or something on nVidia cars?). I would be very surprised if there were some easy way to do that in Blitz.


_PJ_(Posted 2003) [#4]
I know that my graphics card supportsdal-screen in this fashion, and that Windows and DirectX recognise the ability, but accessing it from blitz... bit techy for me


Skitchy(Posted 2003) [#5]
Off the top of my head, here's a REALLY ugly workaround :
Have 2 Blitz3D windows running at the same time, and position one on the second monitor (you may need to drag it there, but I think there's a .dll or userlib that'll let you set the screen position of the window). Assuming this 2nd window still works (and I don't guarantee it will), you could have the first program control the second one using a 'swapfile' - see my code archive entry for details on how to do this.
Obvoiusly you'd need to have 2 almost identical worlds, with the camera and HUD being the only difference, and you'd need to make DAMN sure that something didn't happen in one program that didn't happen in the other.
:)


Qcat(Posted 2003) [#6]
Most dual Monitor set-up has one big screen across the 2 sums think with a resolution like (2048 by 768) I no my Gefoce card can be set up like this(windows98/me don’t do this)

So in tharey if you have 2 monitors set up at has one big one you shood be abale to use

Graphics3d 2048 by 768

And set-up separate camera views with the CameraViewportcommand

CameraViewport camera1,0,0,1024,768
CameraViewport camera2,1024,0, 1024,768


I have not tryd Tecneck this but it might work

Qcat


Koriolis(Posted 2003) [#7]
The problem is you can't rely on the two screens having the same resolution, it's not guaranteed at all.


Avatara(Posted 2003) [#8]
Thanks a lot !!!
There are a lot of very intereting answers !

I plan to have on the first monitor a 3d game
and on a second screen (2d) with for example
some informations like score, life, map, ...

The goal is to use only one pc with 2 monitors (with 2 differents resolutions or not)


Eric Shefferman(Posted 2003) [#9]
I don't know if this is relevant or not, but it might be how you select from multiple monitors -- I think. I've always wondered about the command since in addition to a short explaination of the command the docs say "Normally, this won't be necessary with 2D programming. "

The commands are GfxDriverName$ (index) and SetGfxDriver index

Hopefully this code will start some discussion/explaination:

; GfxDriver Examples 

; Count how many drivers there are 
totalDrivers=CountGfxDrivers() 
Print "Your drivers:" 

; Go through them all and print their names (most people will have only 1) 
For t = 1 To totalDrivers 
Print t+") " + GfxDriverName$(t) 
Next 

; WaitKey() sample 

Print "Press any key to continue." 

key=WaitKey() 


On my machine (I am running 2 monitors off one video card) it displays:

Your drivers:
1) Primary Display Driver
2) NVIDIA GeForce4 MX 440 with AGP8X
3) NVIDIA GeForce4 MX 440 with AGP8X
Press any key to continue.

I do know that some games exhibit weird problems if I have both monitors on -- shutting one of the off through windows usually solves that.

Since the two monitors can run at different resolutions and bit depths, I don't know what would happen if you tried to switch back and forth between them in real time (as in a game displaying stuff on both monitors at the same time).

Addition:

Final bit of code since I think this should be played with by someone more familiar with this stuff. With this code (also stitched together from the online docs) I can select which monitor to display graphics on.

; GfxDriver Examples 

; Count how many drivers there are 
totalDrivers=CountGfxDrivers() 
Print "Choose a driver to use:" 

; Go through them all and print their names (most people will have only 1) 
For t = 1 To totalDrivers 
Print t+") " + GfxDriverName$(t) 
Next 

; Let the user choose one 
driver=Input("Enter Selection:") 

; Set the driver! 
SetGfxDriver driver 
Print "Your driver has been selected!" 

;GRAPHICS Example


; Set The Graphic Mode

Graphics 800,600


; Now print something on the graphic screen

Text 0,0, "This is some text printed on the graphic screen (and a white box)!  Press ESC ..."


; Now for a box

Rect 100,100,200,200,1


While Not KeyHit(1)

Wend 



Avatara(Posted 2003) [#10]
I try your example
It work fine but do you know the way to have 2 simultaneous output ?
In your example, you are oblige to choose one mode !

The solution will be to launch two differents .exe (with a pipe between the 2 applications) ?


Avatara(Posted 2003) [#11]
Strange results !

I have a MSI Ti4200 (8x but i can use only 2x mode)
If i launch two dirrents 3D demo (for example BinaryCage and Big BAng)
- if i launch the 2 applications in the main screen, it work without any speed trouble
- But if one of the windows is on the second screen, the performance down dramaticaly (cpu charge 100%)

And if you have 2 differents resolutions the probleme is more important !

I go now to test it with a ATI Radeon 9700 (8x)


Ricky Smith(Posted 2003) [#12]
Maybe you could use the network commands to set up a server and client session you could then view the client session on the second monitor.