this is my first time with OpenGL and i have no plan how does it work. But today i figured out why the application doesn't work in D2007.
First issue:
The declaration in Delphi7 and below for the API function "InterlockedCompareExchange" is:
function InterlockedCompareExchange( var Destination: Pointer; Exchange: Pointer; Comperand: Pointer ): Pointer stdcall;
But in Delphi 2007:
function InterlockedCompareExchange( var Destination: Longint; Exchange: Longint; Comperand: Longint ): Longint stdcall;
And in MSDN
LONG __cdecl InterlockedCompareExchange( __inout LONG volatile* Destination, __in LONG Exchange, __in LONG Comparand );
The small fix for unitFlyingCow.pas to work in D2007 is:
{$IF CompilerVersion <= 15.0}
if InterlockedCompareExchange(Pointer(fCaptionCS), Pointer(1), Pointer(0)) = Pointer(0) then
{$ELSE}
if InterlockedCompareExchange(Integer(fCaptionCS),1 , 0) = 0 then
{$IFEND}
And so on.....The second issue:
matonga;481496 said:
wiki.delphigl.com/index.php/DGLOpenGL.pas
this version of DGLOpenGL.pas on wiki.delphigl.com is absolutely crap. You need this "DLGOpenGL.pas" on http-www-delphigl.com/do_download.php?f=12000. This is the right version.
If you take the first one i you project and the command "glClearColor (0.0, 0.0, 0.0, 0.0);" was called (on line 422 in unitFlyingCow.pas) the application crash and the CPU clime up on 100%.
Now the application work like a charm.
I have an another question:
Which program you are using to convert verdana font to verdana.dat?
Best regards
Axel
PS: Sorry for my rusty English ;-)








Sign In »
Register Now!
Help


MultiQuote
