Advertisement

Error compiling.. Please help me,newbie inside!!!! :(

Started by October 22, 2000 11:59 AM
4 comments, last by KappaMic 24 years, 3 months ago
Hi, I''ve a little big problem...(first of all... I''m a newbie!! 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 dst_font:=font; end; Where''s the mistake?????????????? I''m working around it for a long time... couldn''t get it works!!!!!! Can someone help me?????
I forgot... the problem is when i call the proc "BuildFont"

Advertisement
Ehm.... can someone help me plz?



Might just be a typo but...

procedure BuildFont(Font_Text : string; dst_font : HFont; dst_gmf: array of GLYPHMETRICSFLOAT);

This has HFont as the second parameter when the variables you''re passing are HFONTs. Notice the different capitalization... Might want to check that...

S.
Just checked... the problem is in the 3rd parameter


Can''t solve the problem

Since I have no idea about the language you''re using, I''m really just guessing at this, but maybe I''ll hit something since nobody else is trying...

Maybe you have to tell it how big of an array of GLYPHMETRICSFLOAT you are sending to the procedure...

S.

This topic is closed to new replies.

Advertisement