delphi 7, ddraw (delphix) help with pixels!!


I use delphi 7 and delphix so I can have ddraw and be able to create a surface to play with pixels.

so in a button trigger i use this:

for i:=1 to 100 do
for j:=1 to 100 do

where dxdraw1 is a ddraw surface.

The problem is that it works, but the result shows after I hoover another window above my program, like it is not updating the rectangle area with the pixels.
(I press the button, the cpu usage is getting up for a short and the rectangle remains black until I hoover another window.)

Also its slow. I read somewhere this:

and after this:
Just remember that this function is extremely slow .
It's locking and unlocking the surface on every pixel set.. not very usable.
PixelDX and turboPixel don't, you manually lock the surface, do all of your
pixel operations and then unlock it.. 1000 times faster.

How to use these functions? I cant find them (and I have no idea since I am beginner on this)?
How to lock first and then unlock?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!