Hi,

GLut defines callback functions, one of them is the display function, which is 
defined as:

TGlutVoidCallback = procedure; cdecl;

This is set by calling glutDisplayFunc(@MyDisplayFunc); 

As these functions are needed per window, I would like to encapsulate each 
window in a class something like:

TMyGLutWindow = class
  private
    procedure MyDisplayFunc; cdecl;
  public
    constructor Create;
end;

In the constructor I would like to set the displayfunction. But doing this I 
get the error:

Error: Incompatible types: got "<procedure variable type of procedure of 
object;CDecl>" expected "<procedure variable type of procedure;CDecl>"

Though I understand the error, I do not know if there is a way to circumvent 
this?

Regards, Darius
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to