![]() |
Opengl wglUseFontBitmaps glCallLists
Man kann ja mit wglUseFontBitmaps die Buchstaben in Listen ablegen und
dann über glCallists einen String (Text) ausgeben.
Delphi-Quellcode:
Weiß jemand, wie hier bei glCallLists(..) der Abstand zwischen den Buchstaben des Textes eingestellt wird ?
lFont := TFont.Create; // Instanz einer Fontklasse erstellen
try lFont.Name := 'arial'; // Name lFont.Size := 32; // Schriftgröße // lFont.Style := [fsBold]; // Styles (fsBold, fsItalic, ...) SelectObject(h_DC, lFont.Handle); // Font auf einen Device Context benutzen wglUseFontBitmaps (h_DC, 0, 255, base); // Mit selektiertem Font Zeichen erstellen
Delphi-Quellcode:
glPushAttrib(GL_LIST_BIT); // Uloží současný stav display listů
glRasterPos3f(-2,2,-1); glrotatef(2.5,0,0,1); glListBase(base); // Nastaví první display list na base glCallLists(length(text),GL_UNSIGNED_BYTE,Pchar(text)); // Vykreslí display listy glPopAttrib; |
AW: Opengl wglUseFontBitmaps glCallLists
ok, ich habs:
![]() logisch: Note that the display list for each character contains transformations to ensure that the next character's relative position is correct |
AW: Opengl wglUseFontBitmaps glCallLists
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:44 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz