- InitOpenGL;
- DC := GetDC(panel1.Handle);
- RC := CreateRenderingContext(DC, [opDoubleBuffered], 32, 24, 0, 0, 0, 0);
- ActivateRenderingContext(DC, RC);
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LESS);
- glClearColor(0,0,0,0);
- glEnable(GL_TEXTURE_2D);
- glShadeModel(GL_SMOOTH);
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
- ...
- ...
- ...
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity;
- glViewPort(0, 0, Panel1.Width, Panel1.Height);
- gluPerspective(50, Panel1.Width/Panel1.Height, 0.1, 128);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity;
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
- ...
- ...
- ...
- glClear( GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT );
- glLoadIdentity;
- glTranslatef( 0, 0.5, -2 );
- ...
- ...
- ...
- glMatrixMode(GL_PROJECTION);
- glDisable(GL_TEXTURE_2D);
- glenable(gl_blend);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glPushMatrix();
- glLoadIdentity();
- glOrtho(0,800,0,800,-2048,2048);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- ...
- ...
- ...
- glColor3f(1, 1, 1);
- glEnable(GL_ALPHA_TEST);
- glAlphaFunc(GL_GREATER, 0.1);
- glBindTexture(GL_TEXTURE_2D,tex_GUI);
- glBegin(GL_quads);
- glTexCoord2f(0,1); glVertex3d(0, 0, -5);
- glTexCoord2f(1,1); glVertex3d(800, 0, -5);
- glTexCoord2f(1,0); glVertex3d(800, 800, -5);
- glTexCoord2f(0,0); glVertex3d(0, 800, -5);
- glEnd();
- ...
- ...
- ...
- tsTextColor3f(0, 0, 0);
- tsFontBind(fSmallFontID);
- tsSetParameteri(TS_ALIGN, TS_ALIGN_BLOCK);
- glLoadIdentity;
- glPushMatrix;
- glTranslatef(0 , 0, 0);
- glrotatef(00,1,0,0);
- glScalef(1, 1, 1);
- tsTextBeginBlock(142, 38, 525, 155, TS_BLOCKFLAG_WORD_WRAP);
- tsTextOutA('TextTextText');
- tsTextEndBlock;
- glPopMatrix;