Original Post
Hello!
I have nearly all tried to get this thing working, but now I don''t know what to do.
I am not able to manipulate a single pixel from a DirectDraw Surface. Here''s my code:
ddsd: TDDSurfaceDesc2;
Primary: IDirectDrawSurface7;
X,Y: Integer;
Primary.GetSurfaceDesc(ddsd);
if Primary.Lock(nil,ddsd, DDLOCK_SURFACEMEMORYPTR or DDLOCK_WAIT,0) = DD_OK then
begin
try
begin
for x:=0 to 1023 do
begin
for y:=0 to 767 do
begin
PByte(Integer(ddsd.lpSurface)+Y*ddsd.lpitch+X)^:= RGB(50,50,50);
end;
end;
end;
finally
Primary.Unlock(nil);
end;
end;
Maybe someone can help me (and post his code)?
thanks
chlupp
Starbyte Developments