Archived

This topic is now archived and is closed to further replies.

bgillick

DX7 multi-texturing in Visual Basic

Recommended Posts

Hi there, I''m in the middle of writing an ''enhanced 2d'' tile engine in Visual Basic.. Now that the laughter has died down .. but I can''t seem to get any multitexture or alpha blending effects to work. I''ve looked at the Enhanced2D program by Tobias Lensing but he uses a struct (MTTLVERTEX) that isn''t in DX7. Could somebody post an example or a link for setting up the rendering states and texture stages for texture blending and/or alpha blending like light halos. Thanks in advance, Brett

Share this post


Link to post
Share on other sites
If you give me more information or mail me your source, I can help you. I can try to give you information that you might already know.

-To use multiple textures you just change the first parameter.-

direct3ddevice.SetTexture 0, texture1 ''Normal Texture
direct3ddevice.SetTexture 1, texture2 ''Light Map etc.

-To use AlphaBlending you use-

direct3ddevice.SetRenderState D3DRENDERSTATE_ALPHABLENDENABLE, TRUE
direct3ddevice.SetRenderState D3DRENDERSTATE_DESTBLEND, CONST_D3DBLEND.D3DBLEND_DESTCOLOR
direct3ddevice.SetRenderState D3DRENDERSTATE_SRCBLEND, CONST_D3DBLEND.D3DBLEND_SRCCOLOR

Share this post


Link to post
Share on other sites