[fpc-pascal] Moving callbackfunctions to class

Darius Blaszyk dhkblaszyk at zeelandnet.nl
Fri Dec 31 15:04:32 CET 2010


On Dec 31, 2010, at 2:23 PM, Reimar Grabowski wrote:

> On Fri, 31 Dec 2010 14:03:27 +0100
> Darius Blaszyk <dhkblaszyk at zeelandnet.nl> wrote:
> 
>> Unfortunately I need a platform independent method to handle this. So assembler is not really the way I want to go, unless it proves to be the only way.
> 
> Now you know why I called glut a major PITA and using platform dependent assembler code to wrap a cross platform lib is just not right. Why don't you look at the context creation code of either TOpenGLContext from Lazarus or the equivalent component from GLScene (yes, it is more difficult than glut but not that difficult)? Glut is just not meant for the things you are doing with it and you are working around restrictions which other context creation mechanisms just don't have. But feel free to ignore my advice as it is your time you are wasting.

I know that GLut is inflexible and that creating your own context is the best way to go. I'm not ignorant to your advice and besides that it is my plan to do so from the beginning. However resolving the message loop for multiple windows is more or less my last obstacle to create an opengl fpgui. When I manage this, I will plead with Graeme to refactor the existing context handling code and create a new "context" layer in fpgui. This will open up the possibility to create multiple backends to fpgui eg cairo, sdl, etc.

Regards, Darius




More information about the fpc-pascal mailing list