Skip to main content
gamedev.net
🔒 Locked

DX7 multi-texturing in Visual Basic

Started by bgillick 1 reply 900+ views
Original Post
bgillick
bgillick
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
nes8bit
nes8bit
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
bgillick
bgillick
Thanks this did help, I wasn''t setting all the flags that I should have been.

Brett

Topic Locked

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

Sign in to reply to this topic.