Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why IDirect3DSurface9::LockRect works very slow?
What parameters should i use to make IDirect3DSurface9::LockRect work fast?
I use Render Target surfaces because of StretchRect.
Posted
Comments
[no name] 10-Dec-10 4:05am    
Does somebody know, what can i do with IDirect3DSurface9::LockRect function?
2 calls to this function runs (waits) 65 % of my render function.
I can not process next frame, because i display video frame, when it comes.
[no name] 10-Dec-10 7:33am    
Is there any way to work directly with surface data without using LockRect?

1 solution

I have used DYNAMIC texrures (D3DUSAGE_DYNAMIC) for 1 call. So i have got 34 % speed increase.

vc
local_handle_result = direct_3D_device->CreateTexture(
        cxImage,
        cyImage,
        1,
        D3DUSAGE_DYNAMIC,
        D3DFMT_A8R8G8B8,
        D3DPOOL_DEFAULT,
        &local_source_texture,
        NULL);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900