![]() |
AW: OpenGL: Verdunkeln
Ich habe das mit GL_LINE_LOOP probiert, nur leider waren die Linien nicht so, wie ich wollte;
Meine Versuchs-Prozedur:
Delphi-Quellcode:
Das Quadrat zeichnen geht, nur das mit der Strecke nicht... (const BlockSize = 1)
procedure DrawBlock(X, Y: Integer; RGBColor: TRGBColor);
begin glBegin(GL_QUADS); glColor3f(RGBColor.R, RGBColor.G, RGBColor.B); glVertex2f(X, Y); glVertex2f(X+BlockSize, Y); glVertex2f(X+BlockSize, Y+BlockSize); glVertex2f(X, Y+BlockSize); glEnd; If (RGBColor.R = 0) and (RGBColor.G = 0) and (RGBColor.B = 0) then Exit; // Falls Hintergrund, dann keine Umrandung glBegin(GL_LINE_LOOP); glColor3f(1, 0, 0); glVertex2f(X, Y); glVertex2f(X+BlockSize, Y); glVertex2f(X+BlockSize, Y+BlockSize); glVertex2f(X, Y+BlockSize); glEnd; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:20 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz