Hi, I''ve a little big problem...(first of all... I''m a newbie!!
![](smile.gif)
I get this message when i try to compile my pgm in delphi : "incompatible types".
This is how i''ve declared my vars in the main pgm:
font1 : HFONT;
gmf_font1 : array [0..255] of GLYPHMETRICSFLOAT;
Here''s how i call my external proc (the proc stays in an other file included in the main one)
BuildFont(''Vivaldi'',font1,gmf_font1);
Here''s how i''ve declared my proc in the external proc file:
unit Procs;
interface
uses Opengl,Windows,SysUtils,Messages,GLaux;
var
font: HFONT; // Build Our Bitmap Font
gmf : array [0..255] of GLYPHMETRICSFLOAT; // Address Buffer For Font Storage
base : GLuint; //Base Display List For The Font Set
procedure BuildFont(Font_Text : string; dst_font : HFont; dst_gmf : array of GLYPHMETRICSFLOAT);
implementation
procedure BuildFont(Font_Text : string; dst_font : HFont; dst_gmf: array of GLYPHMETRICSFLOAT);
begin
base := glGenLists(256); // Storage For 96 Characters
font := CreateFont(-12, // Height Of Font
0, // Width Of Font
0, // Angle Of Escapement
0, // Orientation Angle
FW_BOLD, // Font Weight
0, // Italic
0, // Underline
0, // Strikeout
ANSI_CHARSET, // Character Set Identifier
OUT_TT_PRECIS, // Output Precision
CLIP_DEFAULT_PRECIS, // Clipping Precision
ANTIALIASED_QUALITY, // Output Quality
FF_DONTCARE or DEFAULT_PITCH, // Family And Pitch
PChar(Font_Text)); // Font Name ''Comic Sans MS''
SelectObject(h_DC, font); // Selects The Font We Want
wglUseFontOutlines( h_DC, // Select The Current DC
0, // Starting Character
255, // Number Of Display Lists To Build
base, // Starting Display Lists
0.0, // Deviation From The True Outlines
0.2, // Font Thickness In The Z Direction
WGL_FONT_POLYGONS, // Use Polygons, Not Lines
@gmf); // Address Of Buffer To Recieve Data
CopyFontArray(gmf,dst_gmf); //here i copy the array (another working proc, working... i suppose
![](smile.gif)
dst_font:=font;
end;
Where''s the mistake??????????????
I''m working around it for a long time... couldn''t get it works!!!!!!
![](sad.gif)
Can someone help me?????