DDraw: why is pixel-getting SOOO slow
There''s something that seems to me very strange:
I want to save a section of my backbuffer
in another surface.
I''ve tried it with memcpy and BltFast
but both is much more slowly then blitting TO the buffer...
WHY???
Yes, in most cases
But you can create another ddrawsurface
and then call BltFast from that:
surface->BltFast(...)
as source-surface set the buffer and
so you blit FROM buffer TO surface
It really works, I''ve tried it, also with Blt().
But you can create another ddrawsurface
and then call BltFast from that:
surface->BltFast(...)
as source-surface set the buffer and
so you blit FROM buffer TO surface
It really works, I''ve tried it, also with Blt().
It seems to me like I''m doing anything wrong:
I''ve looked at another source code that get''s pixels
in that way:
pixel=*buffer (buffer is a 16bit integer)
Even if I get my pixels in that simple way
it''s slower than slow.
Could it be that I''m doing anything wrong with locking the surfaces ???
PLEASE HELP ME !!!
I''ve looked at another source code that get''s pixels
in that way:
pixel=*buffer (buffer is a 16bit integer)
Even if I get my pixels in that simple way
it''s slower than slow.
Could it be that I''m doing anything wrong with locking the surfaces ???
PLEASE HELP ME !!!
Maybe:
1. one surface is in videomemory and other is in system memory...this is very slow...
2.backbuffer is busy doing a flip() at monitor refresh rate and waiting flag is set?
3. do u take care at Pitch ?
test this ones and the will see...
Anyway CPU done memcpy (or asm rep movsd) are faster or equal fast as DX only in system memory.
With both surfaces in video memory DX=graphics board drivers are 10 up to 100 times faster!
Bogdan
1. one surface is in videomemory and other is in system memory...this is very slow...
2.backbuffer is busy doing a flip() at monitor refresh rate and waiting flag is set?
3. do u take care at Pitch ?
test this ones and the will see...
Anyway CPU done memcpy (or asm rep movsd) are faster or equal fast as DX only in system memory.
With both surfaces in video memory DX=graphics board drivers are 10 up to 100 times faster!
Bogdan
You''re right, my backbuffer is in videomemory.
I''ll try it with both surfaces in videomemory.
Thanx
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement