> I need a handle on the display, visual, etc that fltk uses so 
> that I can load other libraries that I am using.
> 
> I am developing and interactive 3D application.  For example, 
> another library I am using the Object Oriented Input System 
> library so that I can query multiple instances of keyboards, 
> mice, or joysticks.  I must initialize the OIS by supplying a 
> Diplay*, XVisualInfo* etc.

Yup, OK. You can just create all that stuff in fltk in the "normal" way,
then recover the display etc that fltk has created and pass that on.

> You must have seen my previous post about Gl contexts as I 
> didn't mention it here.  However, if I do get the native 
> handles to work then my problems there would be solved there 
> as well most specifically I would be able enable 
> multisampling anti-aliasing for all the platforms I support.

Yes - I have been reading your posts. I just haven't understood where
you were going, and didn't feel I had anything useful to say. I suspect
others are in the same boat and that's why you got no responses. Ask me
simple questions, I'm much better with them.

> What I want to achieve is this:
> Initialize the the X display, visual, screen and colormap.
> Set these as the globals fltk will use before any windows are shown.
> Use these to initialise other libraries: opengl, ois, etc.
> Have fltk process gui events.
> Have OIS process HID input events.
> Have Opengl draw scenes.
> etc.

What I do is let fltk create all the Xwindows and GL contexts itself,
rather than trying to pass it one I made elsewhere.

Then I get things that fltk has made and pass them to other things as
need 'em.

Can that not work for you?

I don't know enough fltk-2 to say how it would do this, but in fltk-1.x,
well, see (what used to be) Appendix F of the manual and see if that
helps:

http://www.fltk.org/doc-1.1/osissues.html#osissues

http://www.fltk.org/doc-1.3/osissues.html 

I don't know where the equivalent stuff is documented for fltk-2, if at
all.

But anyway, you can probably create your window, then make it current
with 
mywindow->make_current(...) or whatever fltk-2 does, then you can read
the values set for 

extern Display *fl_display;
extern Window fl_window;
extern GC fl_gc;
extern int fl_screen;
extern XVisualInfo *fl_visual;
extern Colormap fl_colormap;

And that takes you some way to where you want to go, I think?








SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to