Thread: D3dswapeffect_copy

  1. #1
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607

    D3dswapeffect_copy

    Just a side note to all those attempting to directly access the back buffer in D3D. Make sure you have your swap effect set to D3DSWAPPEFFECT_COPY or you will get a very annoying flicker.

    Also make sure that you specify your back buffer is a lockable one in your D3DPRESENT_PARAMETERS structure.

    Since you are only locking the buffer once per frame, you shouldn't notice too much of a hit. You should not need to unlock the buffer until you are done with the entire scene.

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Quote Originally Posted by Bubba
    Just a side note to all those attempting to directly access the back buffer in D3D. Make sure you have your swap effect set to D3DSWAPPEFFECT_COPY or you will get a very annoying flicker.
    Isn't that because D3DSWAPEFFECT_FLIP switches the primary and back surfaces so that the primary surface becomes the back surface and vice versa. That would explain the flicker -- you're only drawing something on the screen every other frame, half of the frames would be black or something.

    This is just a guess, I haven't tried anything.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed