Fraxx Daidouji |
Posted - May 23 2005 : 3:41:00 PM 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.
|
Knight Chat X |
Posted - May 28 2005 : 5:40:51 PM '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. |
Fraxx Daidouji |
Posted - May 23 2005 : 9:24:32 PM 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. |
Eric Coleman |
Posted - May 23 2005 : 9:14:31 PM I'm not sure if DirectDraw9 allows you to modify the screen gama, but that's an option in directdraw7. |
Lachlan87 |
Posted - May 23 2005 : 7:42:17 PM 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. |