English version
Accueil     Ŕ propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis ŕ jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml ŕ l'adresse ocaml.org.

Browse thread
Cross-platform "Hello, World" graphical application in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-23 (03:13)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml
Le 23 févr. 05, ŕ 01:05, Jon Harrop a écrit :

> On Tuesday 22 February 2005 23:30, Daniel Bünzli wrote:

>> However the big problem of these custom gui systems is the lack of
>> integration with the native gui system. This may not be an issue for
>> fullscreen vizualisation tools or games but can be for other
>> applications like editors (e.g., because you usually have a single
>> window in which everything occurs (your gl context), you don't have
>> access to platform specific save dialogs, look and feel, etc., etc.).
> I disagree.
> Firstly, you can have as many GL windows and contexts (and widgets) as 
> you
> like. You aren't restricted to just having one window with one widget 
> and one
> context.

I didn't say you were restricted to one widget in one window. I said 
that usually, OpenGL apps implementing their own gui system use only 
one context (e.g. see the various cross-platform 3d modelers that do 
so). There may be many reasons but what comes to my mind is :

a) An OpenGL context is not a lightweight structure. Especially if you 
are doing realtime rendering, a context switch is a heavy operation. 
Very often it is much more efficent to have a single context in which 
you draw various subregion by setting the viewport and scissor rect 
rather than creating many opengl contexts.

b) OpenGL context management is not defined in the opengl specification 
but by platform specific libraries (e.g. agl, wgl, glx, etc) that 
behave quite differently and this means that you may run into various 
issues (like platform dependent context texture sharing policy).

> Secondly, using OpenGL does not prohibit the use of platform-specific 
> look and
> feel. There is no reason you shouldn't be able to bring up native 
> menus and
> dialogs. Qt, GTK and WxWindows all allow you to do this.

Sure but if they do then :

1) Either they don't work at the level of OpenGL. That is they use the 
platform specific gui libraries to provide their cross-platform 
abstraction. Then we are not talking about the same thing (I was 
talking about opengl-based gui systems).

2) Or they try to mimic the platform-specific look in their rendering, 
an imitation that can become obsolated by any system update.

But looking at the end of your message I think that we may not be 
talking about the same thing.