Re: fast drawing in delphi



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

.



Relevant Pages

  • Re: Errors locking offscreen surface if application heap is large
    ... DX8+ interfaces only, we use DX7. ... The Java VM will reserve the entire memory region specified by the ... we use GDI for rendering to the screen. ... In some cases where the DirectDraw in DX7 functionality is not sufficient we ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Errors locking offscreen surface if application heap is large
    ... The Java VM will reserve the entire memory region specified by the ... DX7 still should have good debug output, have you turned the debug level all ... we use GDI for rendering to the screen. ... In some cases where the DirectDraw in DX7 functionality is not sufficient we ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: fast drawing in delphi
    ... why do you say D5 needs messing to work properly? ... >> save and load images with DirectX?? ... > declare "surfaces" which are regions of memory that you can write to. ... DirectDraw will handle the actual "copying" ...
    (comp.lang.pascal.delphi.misc)
  • Video memory buffer allocation in windowed mode
    ... I want to allocate a video memory buffer of user-specified ... I can do it in Windows using DirectDraw, ...
    (comp.os.linux.questions)
  • Re: F1 everytime i post
    ... If you have FC4/5 then boot the CD and run memtest/memtest86. ... IMO, it's either the memory, CMOS battery, PSU or Video that could be ... The other culprit is bad memory. ... to me it's a bios problem caused by memory or power. ...
    (alt.comp.hardware.pc-homebuilt)