mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 08:30:39 +02:00
* win32 fix extdecl instead of cdecl
This commit is contained in:
parent
000049f35b
commit
0c917c3d7b
@ -11,8 +11,14 @@ program bounce;
|
||||
uses
|
||||
gl,glut;
|
||||
|
||||
{#define COS(X) cos( (X) * 3.14159/180.0 )
|
||||
#define SIN(X) sin( (X) * 3.14159/180.0 )}
|
||||
{$MACRO ON}
|
||||
|
||||
{$ifdef win32}
|
||||
{$define extdecl := stdcall;}
|
||||
{$endif}
|
||||
{$ifdef linux}
|
||||
{$define extdecl := cdecl;}
|
||||
{$endif}
|
||||
|
||||
const
|
||||
RED=1;
|
||||
@ -103,7 +109,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure reshape(width,height:longint);cdecl;
|
||||
procedure reshape(width,height:longint);extdecl
|
||||
var
|
||||
aspect : glFloat;
|
||||
begin
|
||||
@ -116,7 +122,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure key(k:char;x,y:longint);cdecl;
|
||||
procedure key(k:char;x,y:longint);extdecl
|
||||
begin
|
||||
case k of
|
||||
#27 :
|
||||
@ -125,7 +131,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure draw;cdecl;
|
||||
procedure draw;extdecl
|
||||
var
|
||||
i : GLint;
|
||||
begin
|
||||
@ -173,7 +179,7 @@ end;
|
||||
|
||||
const
|
||||
vel0 : glfloat = -100.0;
|
||||
procedure idle;cdecl;
|
||||
procedure idle;extdecl
|
||||
begin
|
||||
Zrot:=Zrot+Zstep;
|
||||
Xpos:=Xpos+Xvel;
|
||||
@ -202,7 +208,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure visible(vis:longint);cdecl;
|
||||
procedure visible(vis:longint);extdecl
|
||||
begin
|
||||
if (vis=GLUT_VISIBLE) then
|
||||
glutIdleFunc(@idle)
|
||||
|
Loading…
Reference in New Issue
Block a user