我不是高手,有些东西与大家共享,愿高手指教。
下面的程式不妨一试:
procedure formcreate( );
begin
// 如果你的系统中没有以下字体,请选择另一个在你的系统中使用的字体
// 但只能选择矢量字体,不能选择位图字体
Font.Name := '宋体';
SelectObject(DC, Font.Handle);
// 用这种字体Create display lists for each character in the font:
fontBase := glGenLists(256);
wglUseFontOutlines(DC,
0, //是否显示冒号:
256,
fontBase,//显示列表的基
0,//0:smooth; 1:flat
0.1, // 推移厚度.
WGL_FONT_POLYGONS, nil);
// 修改显示列表的基为正确值,以确保每次总能调用正确的显示列表
glListBase(fontBase);
end;
procedure gldraw( );
begin
glCallLists(2, GL_UNSIGNED_BYTE, PChar('电视'));
end;
在用gltranslate(),glrotate();做相应的处理。