Re: fast drawing in delphi
- From: Jamie <jamie_5_not_valid_after_5_Please@xxxxxxxxxxx>
- Date: Tue, 20 Dec 2005 18:26:31 -0800
Maldona8 wrote:
no no, for sure, no direct image.canvas drawing at all, now I am trying now to see how to make the drawing in memory, and then to play the memory drawing image into screen using bitblt ()... for the moment just big headache... but I believe you guys Yeah, I agree about discontinued DirectX, but if M$ has abandoned DirectDraw that means there is something better around... something they can not compete with Ronald
"Paul Dunn" <paul.dunn4@xxxxxxxxxxxx> a écrit dans le message de news: pM_pf.14916$q4.7149@xxxxxxxxxxxxxxxxxxxxxxx
Maarten Wiltink wrote:
"Paul Dunn" <paul.dunn4@xxxxxxxxxxxx> wrote in message news:SwUpf.48676$uR.25445@xxxxxxxxxxxxxxxxxxxxxxx [...]
DirectX isn't an "image package" solution. The DirectDraw component (or Direct3D as it is now) ...
Isn't there a "Direct2D"? That being what the OP needs...
Around the time of DirectX 8, M$ decided to deprecate the 2D aspect and no longer support DirectDraw (your "Direct2D" interface). It is still supported, but as you say is likely less than optimal now. As the next version of windows will be strictly 3D acceleration only (seen the demo of the new windows UI? I'm moving to linux when XP is dead!) I can't see that DirectDraw will be accelerated above GDI level at all in future.
ISTR that any DirectDraw surfaces used now will use the old DirectX 5 architecture, and not take advantage of any new on-board acceleration your graphics card has to offer. However, as a method of gaining a pointer directly to video memory, it's still invaluable if you're willing to do all your graphics coding by pushing pixels around and not tending to rely on Borland's intolerably slow TBitmap.Canvas or TBitmap.Scanlines methods.
D.
create a Tbitmap.. set the pixelformat property to 8 bit for now.
then set the Width and Height properties
to get the first byte of memory of this bitmap simply use the MyImagePointer := MyBitmap.Scanline[NUmberOflines-1]; this will give you the memory pointer to the first byte of memory. remember that Tbitmaps normally are created upside down. this is from the old days of slow video monitors and video cards so that when painting the image to the screen the OS would paint from the bottom up. this would avoid all the possible multiple flickers and delays you would get when the video card was scanning to refresh the video output verses when the OS was trying to write to the video memory. at best, you would get only one line of flicker if it happen to intersect. since the advent of video memory able to "write" at the same time of scanning now, this problem has gone away.
-- Real Programmers Do things like this. http://webpages.charter.net/jamie_5
.
- Follow-Ups:
- Re: fast drawing in delphi
- From: Maldona8
- Re: fast drawing in delphi
- References:
- fast drawing in delphi
- From: Maldona8
- Re: fast drawing in delphi
- From: Hans-Peter Diettrich
- Re: fast drawing in delphi
- From: Maldona8
- Re: fast drawing in delphi
- From: Paul Dunn
- Re: fast drawing in delphi
- From: Maarten Wiltink
- Re: fast drawing in delphi
- From: Paul Dunn
- Re: fast drawing in delphi
- From: Maldona8
- fast drawing in delphi
- Prev by Date: Re: fast drawing in delphi
- Next by Date: Re: fast drawing in delphi
- Previous by thread: Re: fast drawing in delphi
- Next by thread: Re: fast drawing in delphi
- Index(es):
Relevant Pages
|