Results 1 to 5 of 5

Thread: IDirectDraw & IDirectDrawSurface (Offscreen Surface need

  1. #1

    IDirectDraw & IDirectDrawSurface (Offscreen Surface need

    I have spent some time playing around with the Omega components and they appear to do everything that I need (very well).

    The problem I have is that I need to draw my map to a DirectDrawSurface. The map comprises of various layers of different sized tiles, and to draw each of these on the fly (when you scroll in a particular direction) will really hit the CPU / GFX card.

    The way I have done this in DirectDraw is to blit the centre (non changing bit) section of the current map screen and move it one tile in the direction the map is scrolling, then just draw the new tiles to that buffer surface, finally blitting the new map image to the back buffer. How can I do this with Omega? There doesn't appear to be any DirectDraw interface, or DirectDrawSurface for the back buffer?

    I thought Direct3D used the DirectDraw interface, and needed a surface for the backbuffer? I did have a quick look at the Screen type to see if I could expose the interfaces but I couldn't see them >.<

    Any ideas on how I could get around this? What else can I use in Omega as an offscreen rendering area to store the current map screen?
    http://www.c5software.co.uk (site is being developed at the moment)

  2. #2

    IDirectDraw & IDirectDrawSurface (Offscreen Surface need

    Direct3D does not use any part of DirectDraw.

    You can create a render target (IDirect3DDevice8.CreateRenderTarget) which you can use to draw to, then use that render target as a texture to draw a quad on the screen.

  3. #3

    IDirectDraw & IDirectDrawSurface (Offscreen Surface need

    Quote Originally Posted by Sly
    Direct3D does not use any part of DirectDraw.

    You can create a render target (IDirect3DDevice8.CreateRenderTarget) which you can use to draw to, then use that render target as a texture to draw a quad on the screen.
    Thanks, I will have a play around with that =D

    I read in my Sams DirectX 7 book that Direct3D uses the DirectDraw interface and a surface to output?
    http://www.c5software.co.uk (site is being developed at the moment)

  4. #4

    IDirectDraw & IDirectDrawSurface (Offscreen Surface need

    DirectX 8 was a large change in which DirectDraw support was dropped.

  5. #5

    IDirectDraw & IDirectDrawSurface (Offscreen Surface need

    @Gadget

    On Delphi Sanctuary this same problem was discussed and a solution was created

    http://www.delphisanctuary.com/forum...opic.php?t=554

    Unless I am mistaken this system will work for you.
    The views expressed on this programme are bloody good ones. - Fred Dagg

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •