"Serve Lau" <nihao@[EMAIL PROTECTED]
> wrote in message
news:414f4$48468c83$541fc2ec$17542@[EMAIL PROTECTED]
>
> "Wolfgang Draxinger" <wdraxinger@[EMAIL PROTECTED]
> schreef in bericht
> news:k3aih5-alc.ln1@[EMAIL PROTECTED]
> Serve Lau wrote:
>
>> I'm investigating the use of OpenGL on Linux and 2 screens. But
>> I'm wondering if it's possible to use OpenGL on multiple
>> screens and if so how?
>>
>> For instance glLoadIdentity() sets the current matrix to the
>> identity matrix, but when you have 2 screens you have to
>> specify which screen´s matrix which you cant. So is it possible
>> to control 2 screens in 1 OpenGL application?
>
>> Either do a windows spaning over both screens and set an
>> apropriate view****t with glView****t / glScissor, or create two
>> windows, each with it's own rendering context. Then you
>>can "select" the screen, by making the desired context current.
>>You can share objects (i.e. Display Lists, Textures, stuff like
>>that) between contexts, by supplying the context you want to
>>share with as the "shareLists" parameter of glXCreateContext.
>
> ah I see thank you
>
> so the render function would look like this in pseudo:
>
> select_context(screen1)
> draw_scene1()
>
> select_context(screen2)
> draw_scene2()
>
>
> the screen are unrelated, different things will be rendered not one
scene
> over 2 screens
>
Yes, but, almost all Nvidia and ATI accelerated cards have native
dual-screen sup****t where the pair of screens is treated as one jumbo
framebuffer. Don't usually have to mess with multiple anything, just treat
2
screens as one extra-wide (or tall) one.
jbw


|