Results 1 to 6 of 6

Thread: dxdraw.flip - Which surface?

  1. #1

    dxdraw.flip - Which surface?

    Hi all,

    I want to save a screenshot into a bitmap. However, I want to make sure the the image is that of what is being *displayed* not what I'm drawing on at the moment (dxflip enabled).

    How do I find out which surface I'm on and how do I read from it?

    Any thoughts?

    Damot

  2. #2
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    dxdraw.flip - Which surface?

    Have a look at this topic where I asked the same question.

    http://terraqueous.f2o.org/dgdev/viewtopic.php?t=288
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  3. #3

    dxdraw.flip - Which surface?

    I'll add that the currently visible frame is on the front (primary) surface, since you're always drawing onto the back (secondary) surface. Page flipping is simply a quick way to swap between two surfaces. I'm not sure, since I've not tried, but you should be able to draw the primary surface onto a temp surface you created (perhaps with a big speed hit, but I've never tried it).
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

  4. #4

    dxdraw.flip - Which surface?

    Quote Originally Posted by cairnswm
    Have a look at this topic where I asked the same question.

    http://terraqueous.f2o.org/dgdev/viewtopic.php?t=288

    Yes, thanks for that, I did see your post and I was already doing the same thing. But, you will find that this can cause problems.

    You are saving the current surface you are working with, *not* what is already on the screen already (from the previous flip). So sometimes if your screen has changed a lot the user gets a screen shot of events just after what was on the screen, not what is *actually* visible to him/her.

  5. #5

    dxdraw.flip - Which surface?

    Quote Originally Posted by Alimonster
    I'll add that the currently visible frame is on the front (primary) surface, since you're always drawing onto the back (secondary) surface. Page flipping is simply a quick way to swap between two surfaces. I'm not sure, since I've not tried, but you should be able to draw the primary surface onto a temp surface you created (perhaps with a big speed hit, but I've never tried it).
    Thats my problem. How do I access what is *actually* visible rather than what I'm working with before a flip? Any ideas?

  6. #6
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    dxdraw.flip - Which surface?

    My feeling was that the user was wanting to see what was currently happening and as there is a refresh every 20ms the difference would be practically nothing.

    I think the canvas you are looking for is:

    Code:
    DXDraw.Primary.Canvas.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

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
  •