To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > Visual Basic > Games and Graphics Programming

Reply Post New Thread
 
Thread Tools Display Modes
Old Dec 12th, 2006, 01:54 PM   #1
LordOrion
New Member
 
Join Date: Dec 06
Posts: 2
LordOrion is an unknown quantity at this point (<10)
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!
LordOrion is offline   Reply With Quote
Old Dec 12th, 2006, 02:00 PM   #2
LordOrion
New Member
 
Join Date: Dec 06
Posts: 2
LordOrion is an unknown quantity at this point (<10)
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?
LordOrion is offline   Reply With Quote
Old Dec 18th, 2006, 01:26 PM   #3
singularis
Hyperactive Member
 
singularis's Avatar
 
Join Date: Nov 06
Location: Over There!
Posts: 372
singularis is on a distinguished road (10+)
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
singularis is offline   Reply With Quote
Old Dec 19th, 2006, 12:21 AM   #4
chemicalNova
G&G Moderator
 
chemicalNova's Avatar
 
Join Date: Jun 02
Location: Victoria, Australia
Posts: 4,245
chemicalNova is a jewel in the rough (200+)chemicalNova is a jewel in the rough (200+)chemicalNova is a jewel in the rough (200+)
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
chemicalNova is offline   Reply With Quote
Old Dec 19th, 2006, 05:57 AM   #5
Jacob Roman
Banned
 
Jacob Roman's Avatar
 
Join Date: Aug 04
Location: Cocoa Beach, FL Chit Chat Posts: 500+
Posts: 4,371
Jacob Roman is a jewel in the rough (200+)Jacob Roman is a jewel in the rough (200+)Jacob Roman is a jewel in the rough (200+)
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.
Jacob Roman is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Games and Graphics Programming


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:21 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.