RE: [fltk.general] Choose OpenGL profile.

33 views
Skip to first unread message

MacArthur, Ian (Selex ES, UK)

unread,
Feb 23, 2015, 8:19:37 AM2/23/15
to fltkg...@googlegroups.com
> Does FLTK support changing OpenGL profiles?

I'm the wrong person to answer this, as GL's not my strong suit at all, but I *think* the answer is possibly no...

> I'm not super-familiar with OpenGL myself but it was a
> question I was asked when I announced the Haskell bindings.
> I'll cut-and-paste the actual question here:
> " ... can I choose the OpenGL profile I'm using to be a current
> core profile like 3.3 or 4.1?"


So... what I did was created the basic Fl_Gl_Window, and I wanted to do a bunch of "clever" stuff that didn’t seem to be possible in the GL context there.

So, I created a bunch or GL renderbuffers and used a GL extension wrangler (I used glew) to figure out what GL capabilities and profiles were available on the host machine, and so on.

Then I basically drew everything into the renderbuffers, and at the "last minute" (basically in the draw method of my Fl_Gl_Window) I effectively blitted the rendered scene into the Fl_Gl_Window for display.

This meant I could set up the renderbuffers and use all the fancy stuff for my scene, and set the profile I wanted and such, without messing with the fltk GL state at all.

Now, there's almost certainly a better or cleverer way to do all this, but it seems to work! (And it seems to be fast, too.)





Selex ES Ltd
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.
********************************************************************

aditya siram

unread,
Feb 24, 2015, 3:04:10 PM2/24/15
to fltkg...@googlegroups.com, ian.ma...@selex-es.com
I also did notice this: http://www.fltk.org/doc-1.3/Fl__Gl__Choice_8H_source.html which seems to do what I want.

Unfortunately it's an internal class, and there's no example documentation of usage.

Thanks your prompt reply!
-deech
Reply all
Reply to author
Forward
0 new messages