Post

Console

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 DirectDraw 9 alphablending(Fading) VB.NET 2003
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Fraxx Daidouji
Neophyte

8 Posts

Posted - May 23 2005 :  3:41:00 PM  Show Profile  Reply with Quote
I a wanting some help on how to fade images in DirectDraw9.

Example usage:
The screen starts out black and then fades to the main menu.


Lachlan87
Moderator

USA
160 Posts

Posted - May 23 2005 :  7:42:17 PM  Show Profile  Reply with Quote
DirectDraw doesn't have this functionality built-in.

There are other options, but you won't like them. You could:

Use Direct3D for your 2D graphics.
Use a 3rd party engine.
Write your own fading code from scratch---Not easy for a beginner. (Meaning I can't tell you how).
Decide it's not worth it and abandon the idea.
Draw each stage of the fade by hand and make it an animation.

I hope this helps. . .Or at least doesn't hurt too much.
Go to Top of Page

Eric Coleman
Gladiator

USA
807 Posts

Posted - May 23 2005 :  9:14:31 PM  Show Profile  Visit Eric Coleman's Homepage  Send Eric Coleman an AOL message  Send Eric Coleman an ICQ Message  Click to see Eric Coleman's MSN Messenger address  Send Eric Coleman a Yahoo! Message  Reply with Quote
I'm not sure if DirectDraw9 allows you to modify the screen gama, but that's an option in directdraw7.
Go to Top of Page

Fraxx Daidouji
Neophyte

8 Posts

Posted - May 23 2005 :  9:24:32 PM  Show Profile  Reply with Quote
I know how to do it in Direct3D9 I just thought it might be eaiser in DirectDraw9 because my program is 2d graphics. I guess if I haft to go back to Direct3D9 I will. I program c script ruby and other languages like that. 3D gamestudio is one program. I just started geting into DirectX9 For Visual Basic .NET(I know how to program in VB.NET not at a professional level maby at an advanced level). DirectDraw9 seemed easy and I could get things done, but maby I should have checked it out a little more before I started using it.

Thanks for all information.
Go to Top of Page

Knight Chat X
Squire

USA
24 Posts

Posted - May 28 2005 :  5:40:51 PM  Show Profile  Visit Knight Chat X's Homepage  Reply with Quote
'Alpha Channel Filter.
device.SetSamplerState(0, SamplerStageStates.MinFilter, Direct3D.TextureFilter.Linear)
device.SetSamplerState(0, SamplerStageStates.MagFilter, Direct3D.TextureFilter.Linear)

'Blend.
device.RenderState.AlphaBlendEnable = True
device.RenderState.SourceBlend = Blend.SourceAlpha
device.RenderState.DestinationBlend = Blend.InvSourceAlpha


I don't know which program you use for textures, but make sure whatever part you wish to have transparent/blended has the alpha channel set on the texture itself, when it is rendered it should be blended.

The net is getting bigger and bigger.

Edited by - Knight Chat X on May 28 2005 5:44:14 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.