- //Teilbereich eines 4 geteilten Viewports
- glViewport(vport[FNumberfigures-1,1], vport[FNumberfigures-1,2], min(w,h), min(w,h));
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity;
- gluPerspective(1, 1, NearClipping, FarClipping);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity;
- glEnable(GL_Lighting);
- glEnable(GL_Light0);
- //Matrixmanipulation für starres Achsensystem
- for i:=0 to 3 do
- for j:= 0 to 3 do
- m[i][j] := 0;
- m[0][0] := 1;
- m[1][1] := 1;
- m[2][2] := 1;
- m[3][3] := 1;
- m[3][2] := -130;
- glMultMatrixf(@m);
- // setting color or with glColor
- tsTextColor3f(1, 1, 1);
- // set align to center
- tsSetParameteri(TS_ALIGN, TS_ALIGN_BLOCK);
- tsSetParameteri(TS_VALIGN, TS_VALIGN_TOP);
- // draw Textblock
- tsTextBeginBlock(20, 20, w -40, h -40, TS_BLOCKFLAG_WORD_WRAP);
- // text out first char
- tsFontBind(fFontID);
- tsTextOutA('Hallo');
- tsTextEndBlock;
- //Achsen zeichnen
- gltranslatef(-0.5,-0.5,0);
- glBegin(GL_Lines);
- glColor3f(1,0,0);glVertex3f(-0.5,-0.5,0);glVertex3f(-0.5,0.5,0);
- glColor3f(0,1,0);glVertex3f(-0.5,-0.5,0);glVertex3f(0.5,-0.5,0);
- glColor3f(0,0,1);glVertex3f(-0.5,-0.5,0);glVertex3f(0,-0.25,0);
- glEnd;