Skip to main content
GameDev.net gamedev.net
🔒 Locked

Blending problems

Started by SPatuel Mar 3, 2004 at 9:07 AM 0 replies 250+ views
Original Post
SPatuel
SPatuel
Hi All, Blending is a pain for me, I am trying to write a simple tile engine, the images are ok, everything looks fine, but when I draw it on Direct 3d is showing a small line between every sprite, indeed, I am pretty sure is something wrong with the blending, can anybody check the code or explain me how blending works? Thanks a lot. Code: ----------------------------------------------------------------_objDD.RenderState.CullMode = Cull.Clockwise; _objDD.RenderState.Lighting = false; _objDD.RenderState.AlphaBlendEnable = true; _objDD.RenderState.SourceBlend = Blend.SourceAlpha; _objDD.RenderState.DestinationBlend = Blend.InvSourceAlpha; _objDD.Clear (ClearFlags.Target, Color.FromArgb (255,0,0,0).ToArgb(),0,0); Draw: Code: ---------------------------------------------------------------- m_MainSprite.Begin (SpriteFlags.AlphaBlend); m_MainSprite.Draw ( m_Map [FirstHeightTile,FirstWidthTile,0].Tile_Texture, m_Map [FirstHeightTile,FirstWidthTile,0].Frame, VectorNull, Vector, Color.FromArgb(255,255,255,255).ToArgb() ); ---------------------------------------------------------------- Can anybody help me please? thanks!!
Syco - Spatuel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.