Archived

This topic is now archived and is closed to further replies.

JoHnOnIzEr

Help making surface

Recommended Posts

Up until this point, once i blited everything to my offscreenplain i would blit the plain to the primary surface. However, i wanted to see if flipping thep rimary and a backbuffer would be faster. My app runs in a window and im using vb.
Set DDRAW = dX.DirectDrawCreate("")
DDRAW.SetCooperativeLevel frmHwnd, DDSCL_NORMAL

'Setup primary surface (screen)
SurfDesc.lFlags = DDSD_CAPS Or DDSD_BACKBUFFERCOUNT
SurfDesc.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE Or DDSCAPS_FLIP Or DDSCAPS_COMPLEX
SurfDesc.lBackBufferCount = 1
Set Primary = DDRAW.CreateSurface(SurfDesc)
Thats how i setup DDRAW and my primary surface. It gave me the error on the last line of it where i set the primary surface. Any ideas? [edited by - JoHnOnIzEr on August 9, 2003 12:21:17 AM]

Share this post


Link to post
Share on other sites