Lock. vs Blt SOLVED
What do you think is faster? Fill a Surface with black using a Color Blit or a Lock and setting the VRAM to 0?
[Edited by - m4ster on January 14, 2007 12:43:00 PM]
Can we have a side-order of context to go with that?
I guess DirectDraw, but you could be using Direct3D (IDirect3DDevice9::ColorFill()?)...
Either way, its difficult to say which is faster - the graphics pipeline is a finely balanced beast that often defies sweeping statements regarding performance [smile]
A simple test would be to profile it yourself - I'm sure that both methods wouldn't be hard to write. Just wrap them inside QueryPerformanceCounter() blocks and see what you get...
hth
Jack
I guess DirectDraw, but you could be using Direct3D (IDirect3DDevice9::ColorFill()?)...
Either way, its difficult to say which is faster - the graphics pipeline is a finely balanced beast that often defies sweeping statements regarding performance [smile]
A simple test would be to profile it yourself - I'm sure that both methods wouldn't be hard to write. Just wrap them inside QueryPerformanceCounter() blocks and see what you get...
hth
Jack
Hey,
I mean in DirectDraw. I forget to write this, because I just worked with DirectDraw until now.
But I think it is better to use the blitter, because you dont have to care about the pitch.
[Edited by - m4ster on January 14, 2007 12:16:08 PM]
I mean in DirectDraw. I forget to write this, because I just worked with DirectDraw until now.
But I think it is better to use the blitter, because you dont have to care about the pitch.
[Edited by - m4ster on January 14, 2007 12:16:08 PM]
I may be wrong, but wouldn't using Blt allow DirectX to take advantage of any hardware support for the operation that may be present on a given computer? If you use Lock and memset or whatever, you will force the operation into main CPU etc.
After a long night I decided to take the Blt(and ColorFill) method. Not because of any speed reasons, just because it's simplyer to implement. I haven't to care about the extra memory pieces to make the surface a multiple of 2.
EasilyConfused
Yes, you are right, this is another very important point. Thank you.
[Edited by - m4ster on January 14, 2007 12:50:29 PM]
EasilyConfused
Yes, you are right, this is another very important point. Thank you.
[Edited by - m4ster on January 14, 2007 12:50:29 PM]
Where is the Blt method? I'm unfamiliar with that. But I've heard much and feel like I'm missing out :(
-Devin
-Devin
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement