- procedure TguiFrame.UpdateFBO;
- begin
- fFBO.Bind;
- glMatrixMode(GL_PROJECTION);
- glPushMatrix;
- glLoadIdentity;
- glOrtho(0, Width, Height, 0, -10, 10);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix;
- glLoadIdentity;
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
- glDisable(GL_DEPTH_TEST);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
- glColor4f(1, 1, 1, FRAME_TRANSPARENCY);
- glBegin(GL_QUADS);
- glVertex2f( 0, 0);
- glVertex2f( 0, Height);
- glVertex2f(Width, Height);
- glVertex2f(Width, 0);
- glEnd;
- tsTextColor4f(1, 1, 1, 1);
- tsSetParameteri(TS_ALIGN, TS_ALIGN_BLOCK);
- tsSetParameteri(TS_VALIGN, TS_VALIGN_TOP);
- tsTextBeginBlock(20, 20, 200, 200, TS_BLOCKFLAG_WORD_WRAP);
- tsFontBind(fFontID);
- tsTextOutA(PAnsiChar(fCaption));
- tsTextEndBlock;
- glDisable(GL_TEXTURE_2D);
- glMatrixMode(GL_PROJECTION);
- glPopMatrix;
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix;
- glEnable(GL_DEPTH_TEST);
- fFBO.Unbind;
- end;