i have a question do i need to lock the surface when i'm using bltfast? ------------------------------------------------------ You can kill a thousand; you can bring an end to life; you cannot kill an idea. -------------------------------------------------
Posted on 2001-03-28 11:47:00 by eko
Windows SDK docu says: This method works only on display memory surfaces and cannot clip when blitting. That means (I think so :confused: ) - bltfast seems to be independend from locking surfaces, but must be a surface with display memory caps.
Posted on 2001-03-28 12:52:00 by beaster
No, u dont have to lock surfaces if you do Blt or BltFast...but dont just blit... pseudo code: while(TRUE){ HRESULT error = Blt/BltFast... if error = DD_Ok {return} if error = DDERROR_SURFACELOST {your function where you restore and reload all surfaces!} if error = ...etc..check your .doc from directx sdk } this way you do it the right way... bye
Posted on 2001-03-28 16:58:00 by Geecko
If you want to write your own blitter, get the value from: (DDSURFACEDESC).lpSurface You must use an lock/unlock sequnce to get this value, but after that its yours. Microsoft, however will tell you to only access your surface between lock/unlock calls. I do know of one pc game in '98 that use above method of lock/unlocking once to get the pointers to the surfaces. So it must be pretty stable to do it the non-MS way.
Posted on 2001-03-28 17:10:00 by asm_happy
but then again Blt and Bltfast (not so fast IMHO) will implicit lock the surfaces on whitch they blit So no you dont have to lock Blt will do the lock for you :)
Posted on 2001-03-28 21:46:00 by BogdanOntanu