Archived

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

Guest Anonymous Poster

blitter don't work

Recommended Posts

Hi,
it doesn't work because you want to blit from the backbuffer to the primary surface, that's the problem. Try it this way :

  • Create primary surface
  • Attach backbuffer
  • Create offscreen-surface
  • Load bitmap to offscreen-surface
  • Blit the bitmap from the offscreen-surface to the backbuffer
  • Flip

    CU

    ------------------
    Skullpture Entertainment
    #40842461

    Share this post


    Link to post
    Share on other sites
    I think you're getting a bit confused.

    You don't need to Blt the back buffer to the front buffer if you flip. Flip does that for you (well, it actually does something else), but it brings the back surface to the front.

    The process you will want to use is this:

    init front buffer, attach back

    m_pBackBuffer->Blt(OffscreenSurface, rect, etc);
    ..
    ..
    as many blts as neede
    m_pPrimary->Flip();

    The flip will show what was on the back buffer.

    Share this post


    Link to post
    Share on other sites
    Guest Anonymous Poster
    Ahhh, thank you for your help, but I realised what I've been doing! Because I was unfamiliar with the API, i was just using the function straight from the book, and using the flag that allowed transparency colour keying, but I hadn't set this up!

    Sorry I couldn't be more clear in my function, its because I use the internet at school, but code at home, so I can't just copy and paste...

    see ya

    Share this post


    Link to post
    Share on other sites
    Guest Anonymous Poster
    Hello, I am new to direct x and was learning through Andre LaMoth's "dumbies" book. My problem is that the blitter wont work.

    I set up my primary surface, attach the backbuffer, etc, and load in a picture into the back surface. This works fine because I can flip, and I see the image.

    however, when I call

    lpddsprimary->Blt(sourceRect, backbuffer), destRect, etc)

    it doesn't work. There is nothing. I know I may have mixed up the rectangles on this message, but it should work, shouldn't it?

    The other thing is the DDS_WAIT (or
    similar), which I have enabled.

    If anyone knows why this doesn't work, please let me know.

    p.s. i am using 16 bit colour at 640 x 480.

    see ya

    Share this post


    Link to post
    Share on other sites