- glColor4f(1, 1, 1, 1);
- glDisable(GL_BLEND);
- with Landschaft do begin
- Left := 0;
- Top := 0;
- Width := ClientWidth;
- Height := ClientHeight;
- Landschaft.Render;
- end;
- glEnable(GL_BLEND);
- // Textur 1 setzen
- glActiveTexture(GL_TEXTURE0);
- glEnable(GL_TEXTURE_2D);
- glBindTexture(GL_TEXTURE_2D, HintergrundBild.Textur.ID); // "Szene"
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- // Alphatextur setzen
- glActiveTexture(GL_TEXTURE1);
- glEnable(GL_TEXTURE_2D);
- glBindTexture(GL_TEXTURE_2D, mask.Textur.ID);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
- glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_ADD);
- glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_TEXTURE);
- glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA, GL_TEXTURE); // k.A. was hier für Werte hinkommen?
- glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA);
- glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA, GL_SRC_ALPHA);
- glBegin(GL_TRIANGLE_STRIP);
- // glColor4f(0, 0, 0, 0);
- glMultiTexCoord2fARB(GL_TEXTURE0, 0, 0);
- glMultiTexCoord2fARB(GL_TEXTURE1, 0, 0);
- glVertex3i(5, Clientheight-5, 0);
- // glColor4f(0, 0, 0, 0);
- glMultiTexCoord2fARB(GL_TEXTURE0, 0, 1);
- glMultiTexCoord2fARB(GL_TEXTURE1, 0, 1);
- glVertex3i(5, 5, 0);
- // glColor4f(0, 0, 0, 1);
- glMultiTexCoord2fARB(GL_TEXTURE0, 1, 0);
- glMultiTexCoord2fARB(GL_TEXTURE1, 1, 0);
- glVertex3i(Clientwidth-5, Clientheight-5, 0);
- // glColor4f(0, 0, 0, 1);
- glMultiTexCoord2fARB(GL_TEXTURE0, 1, 1);
- glMultiTexCoord2fARB(GL_TEXTURE1, 1, 1);
- glVertex3i(Clientwidth-5, 5, 0);
- glEnd;