Jump to content

  • Log In with Google      Sign In   
  • Create Account


blitter don't work


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 07 October 1999 - 03:59 PM

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



Sponsor:

#2 NuFAN   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 October 1999 - 02:20 AM

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


  • #3 Sphet   Members   -  Reputation: 631

    Like
    Likes
    Like

    Posted 07 October 1999 - 06:31 AM

    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.


    #4 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

    Likes

    Posted 07 October 1999 - 03:59 PM

    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





    Old topic!
    Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



    PARTNERS