Archived

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

Help with D3DTADDRESS_BORDER

This topic is 5748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I''m trying to get a texture working with D3DTADDRESS_BORDER. Texture coordinates outside the range [0.0, 1.0] are set to the border color. I''ve tried lots of combinations and I''ve finally caved and now seek help. This is a snippet of my code. g_d3d_device->SetTexture ( 0, g_texture ); g_d3d_device->SetTextureStageState(0,D3DTSS_ADDRESS,D3DTADDRESS_BORDER); g_d3d_device->SetTextureStageState(0,D3DTSS_BORDERCOLOR, 0x00FFFFFF); g_d3d_device->DrawPrimitive(D3DPT_TRIANGLEFAN, D3DFVF_LVERTEX, map_vertices, 38, 0 ); It behaves just like D3DTADDRESS_MIRROR. I know this is simple, so please point me in the right direction. Any help would be appreciated. For once Google has let me down. Be seeing you... lemming

Share this post


Link to post
Share on other sites

Have you checked for support in the D3D device caps ?
What does ValidateDevice() return ?

Many cards don''t support borders - for example the GeForce2 Ultra in my work machine doesn''t.


--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites