Original Post
Hey all,
I''m trying to implement a ''screen shake'' effect for explosions by copying the backbuffer with an offset (that decreases quickly over time). For instance, I''d like to present the backbuffer with everything offset by 10 pixels across and -5 pixels down. The next frame it will choose new, random offsets.
I create the device using D3DSWAPEFFECT_COPY.
I''m using Direct3D8/Visual Basic. I''ve been looking thru the SDK and this is all I can find for help on the present parameters:
mD3DDevice.Present ByVal 0, ByVal 0, 0, ByVal 0
This example is given over and over. But I don''t want to pass Byval 0, I want to pass a rectangle!! Everything I''ve tried just gives an automation error. Does anybody know how to do this in VB? I tried
Dim region as RECT
(fill members of region)
mD3DDevice.Present ByVal 0, region, 0, ByVal 0
but no luck. How do I do this? Why is this not better documented????
-Jay