|
|
#1 |
|
New Member
Join Date: Dec 06
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 |
|
New Member
Join Date: Dec 06
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 |
|
Hyperactive Member
Join Date: Nov 06
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 |
|
G&G Moderator
Join Date: Jun 02
Location: Victoria, Australia
Posts: 4,245
![]() ![]() ![]() |
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 |
|
Banned
Join Date: Aug 04
Location: Cocoa Beach, FL Chit Chat Posts: 500+
Posts: 4,371
![]() ![]() ![]() |
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.
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|