Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   OpenGL Bitmap für Texttur schnell im Speicher erzeugen (https://www.delphipraxis.net/180893-opengl-bitmap-fuer-texttur-schnell-im-speicher-erzeugen.html)

luisk 29. Jun 2014 16:26

AW: OpenGL Bitmap für Texttur schnell im Speicher erzeugen
 
Die Sache mit dem Laden von der Platte ist mittlerweile schon erledigt.

Jetzt geht es nur noch um die Geschwindigkeit.

Scanline[] ist seltsamer Weise langsamer als bmp.canvas.pixels[lx,ly] :?:

Gibt es evtl. einen Turbo über Win API?

luisk 29. Jun 2014 17:40

AW: OpenGL Bitmap für Texttur schnell im Speicher erzeugen
 
jetzt läuft
Delphi-Quellcode:
 l_ptr:=bmp.ScanLine[y];
schneller
Grund:
Delphi-Quellcode:
dc := GetDC(0);
:
:
ReleaseDC(0, dc);
seltsam :cyclops::cyclops::cyclops:
Delphi-Quellcode:
  inc(z);
    bmp.canvas.Textout(20,20,inttostr(z));
    dc := GetDC(0);
    xwidth := bmp.Width;
    yHeight := bmp.Height;
    for y := 0 to yHeight-1 do begin
         l_ptr:=bmp.ScanLine[y];
        for x := 0 to xwidth-1 do begin
           l_r:= l_ptr.rgbBlue;
           l_ptr.rgbBlue:=l_ptr.rgbRed;
           l_ptr.rgbRed:=l_r;
           texdata[((yHeight-1)-y)*xwidth+x] := l_ptr^;
           inc(l_ptr);
       end;
    end;
    ReleaseDC(0, dc);


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:27 Uhr.
Seite 2 von 2     12   

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-2025 by Thomas Breitkreuz