I have a trouble with texture mapping.
So please give me an advice.
This is the texture
BUT after drawing square polygon with this texture
pD3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );pD3DDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_POINT );pD3DDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_POINT );pD3DDevice->SetFVF(D3DFVF_XYZRHW| D3DFVF_TEX1);pD3DDevice->SetTexture( 0, m_pTex);float fLeftU = 0;float fTopV = 0;float fRightU = 1; float fBottomV = 1;pD3DDevice->GetRenderTarget(0, &pSurf);pSurf->GetDesc(&desc);pSurf->Release();FLOAT w = (FLOAT)desc.Width;FLOAT h = (FLOAT)desc.Height;typedef struct{float p[4]; float t[2];} SV;SV square[4] = {{0-0.5f, 0-0.5f, 0.5f, 1.0f, fLeftU, fTopV,},{w-0.5f, 0-0.5f, 0.5f, 1.0f, fRightU, fTopV,},{0-0.5f, h-0.5f, 0.5f, 1.0f, fLeftU, fBottomV,},{w-0.5f, h-0.5f, 0.5f, 1.0f, fRightU, fBottomV,},};pD3DDevice->SetRenderState(D3DRS_ZENABLE, FALSE); pD3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, svQuad, sizeof(SV));
it become like this.
My window size and the texture size are same.
So please tell me how to avoid this blurr effect at the edge.
In other words, how can I paste the texture without changeing its appearance?
Thanks