Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-03

catch TOpenGLContext exceptions

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrea Mauri

Dear all,

I developed an application using TOpenGLcontext component in a form. Some users have problems with opengl (especially on linux), missing libraries, FB config missing and so on.

Actually if the system on which my application is running has problems with opengl my app crashes.
e.g.:
"Could not find FB config"

I would like to catch these exceptions and if Topenglcontext cannot work I would like to disable it and run my app wihout it. The form with TOpenGLcontext can be used but it is not essential, my app can work without it losing few functionalities.

I tried creating the TOpenGLcontext at runtime (in try .. finally) but it does not work, I got an error and the app stop working. I would like to test if TOpenGLcontext can be created, if not I would like to not create TOpenGLcontext but let my app running anyway.

Is it possible? How can I do that?

Thanks.
Andrea

Reply by email