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!
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?
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
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 :p
chem
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. ;)