Autor Beitrag
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Mo 16.09.02 05:17 
Hi,

mal wieder ein OpenGL Problem.. (Ja ja, ich lern's grad)

Ich möchte eine 3D Schrift machen, und versuch das derzeit so:

GlobaleVars:
ausblenden Quelltext
1:
2:
3:
var
  FDC: hDC;
  Base: GLUInt;


im OnCreate vom Form:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var
  Font: HFont;
begin
  [...]
  FDC:=CreateCompatibleDC(0);
  Base:=glGenLists(256);
  Font:=CreateFont(-12,30,0,0,FW_BOLD,0,0,0,ANSI_CHARSET,OUT_TT_PRECIS,CLIP_DEFAULT_PRECIS,ANTIALIASED_QUALITY,FF_DONTCARE or DEFAULT_PITCH,'Comic Sans MS');
  SelectObject(FDC,Font);
  wglUseFontOutlines(FDC,0,255,Base,0,0.2,WGL_FONT_POLYGONS,nil);
end;


im Draw:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
begin
  [...]
  glColor3f(1.0, 1.0, 0.0);
  glCallList(67);
  [...]
end;


Leider klappt das bei mir nich.. normalerweise sollte da ja jetzt nen Gelbes B sein.. aber.. is net.. :(

weiß jemand was ich falsch mache??

Au'revoir,
Aya
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Mo 30.09.02 12:32 
1) Villeicht stimmt wqas mit CreateFont nicht, nimm doch einfach selectobject(fdc,form1.font.handle);

2) Kann es sein, dass der Text außerhalb des Sichbaren bereichs liegt? versuch mal

glTranslatef(0.0, 0.0, -10.0);
glCallList(67);

3) Listen-Basis nicht Vergessen:
glCallList(Base + 67);

- AP -
Aya Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Mo 30.09.02 15:26 
ne, das hat irgendwas mit den DisplayListen zu tun... wenn ich die selber erstelle werden die irgendwie auch nie angezeigt :(