[fpc-devel] OpenGL library loading
Balogh, Karoly (Charlie/iNQ)
charlie at scenergy.dfmk.hu
Mon Jun 20 13:40:34 CEST 2005
On Mon, 20 Jun 2005, Ales Katona wrote:
> I've noticed that openGL libraies are loaded in the initialization
> section and if the loading fails it writelns something and halts.
> I think this is innapropriate.
> I've currently made it to try and load the library in the initialization
> but without any "failure notice". I've added a GL[u[t]]IsLoaded function
> so the users can see and also TryLoadGL[u[t]].
Since on MorphOS, you have to open all libraries by hand anyway, i also
added two functions similar to these above, into MorphOS version of
OpenGL unit. One of them will try to open and init opengl, and return
True if successful, else false. But no messages are printed. If the
opening was successful, it links itself to the exitproc-chain, to make
sure OpenGL library is closed on exit. But also a close-by-hand procedure
is available. (Check out other MOS's unit sources, like intuition for
example, to take a look on init/exit code i use.)
Unfortunately, OpenGL support on MorphOS can't be made public yet, because
it contains stuff not-to-be-published yet. (API/ABI might change, before
next MorphOS release). But i still think such a modification is highly
recommended. I also wanted to contribute my changes after MOS's OpenGL
support will become public. I'm really waiting for the others opinion.
I'll modify my version according to it then.
(Screenshot of FPC's OpenGL support working on MorphOS:
More information about the fpc-devel