Hey, I'm trying to learn Direct Draw 7. But it is kind of hard.

VB Code:
  1. MainDesc.lFlags = DDSD_CAPS Or DDSD_BACKBUFFERCOUNT
  2. MainDesc.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE Or DDSCAPS_FLIP Or DDSCAPS_COMPLEX
  3. MainDesc.lBackBufferCount = 1
  4. Set PrimaryBuffer = Motor.CreateSurface(MainDesc)

What are the 'caps'?? Can anybody explain deep how this works?
What are the difference between DDSCAPS_COMPLEX, DDSCAPS_FLIP and DDSCAPS_PRIMARYSURFACE ?
And what are the difference between DDSD_CAPS and DDSD_CAPS2? Or 3?