Results 1 to 5 of 5

Thread: Small DirectDraw question

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    2

    Small DirectDraw question

    Hello everyone,

    This is my first post here. Just stumbled over this forum, and it appears to be exactly what I am looking for!

    I am trying to make my own little application using DirectDraw. I'm doing this in windowed mode, and I'm basically drawing to a picture box using blt. In doing this, I am drawing circles, lines and so on, to the picturebuffer (or the bitmap that is loaded into that buffer).

    Is there any way of removing these circles and lines again? Like, "clearing" the picturebuffer of anything but the actual bitmap that is loaded into it?

    Thanks for all help!

  2. #2

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    2

    Re: Small DirectDraw question

    Oh, and seeing its a windowed mode application, I would prefer using just one buffer. Can I "wipe" the buffer without having to flip and such?

  3. #3
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: Small DirectDraw question

    You can clear it by using BltFillColor with the directdraw object.
    You can specify a color by using rgb()

    I hope that helps
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  4. #4
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Small DirectDraw question

    Sounds to me, and, correct me if I'm wrong, that you aren't in-fact using DirectDraw at all. You're manually creating this backbuffer and drawing into it? Thats GDI my friend, and its completely different

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  5. #5
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Small DirectDraw question

    Don't manually make a backbuffer. DX was designed to do it for you, at blazing speed.

    Personally if I were you, I wouldn't use DirectDraw for 2D. It's very limited and was designed for older cards. You can't rotate images or do special effects like alphablending, or many other things. Use Direct3D instead using a TLVertex so the Z coordinate is ignored. I have a Massive DX tutorial in my signature if you are using VB6.

Posting Permissions

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



Click Here to Expand Forum to Full Width