->UnlockRect(0); as you see it locks in the complete sourcetexture, and the rect of the destination texture where the source texture should be pasted to. then it copies all the data from the source to the destination and unlocks both. thanks in advance Morte
paint textures at runtime
i am new to directx and i have a hopefully simple question.
i generate some textures which should be sourceparts for other textures.
i want to compose the final textures from those source parts.
here is the code i have written but it does not work:
m_pTexTile[ number ] ->LockRect(0, &oTextureLock, &m_pRectRight,0);
m_pTexPartsRot[ right ]->LockRect(0, &oPartLock, NULL, 0);
pVec4Texture = (D3DXVECTOR4*)oTextureLock.pBits;
pVec4Part = (D3DXVECTOR4*)oPartLock.pBits;
for (int i = 0; i < m_iD * 2 * m_iK ; i++)
{
pVec4Texture = pVec4Part;
}
m_pTexTile[number]->UnlockRect(0);
m_pTexPartsRot
if i fill a rectangular area this way for example in the middle of the texture then not all the area is filled but like half of the area. at the sides where no pixel should be changed (outside the destistination rectangle) pixels are changed.
all the changed pixels build one thick line over the texture. it looks as if the misplaced pixels are the ones that are needed to fill the rest of the rectangle.
tia
all the changed pixels build one thick line over the texture. it looks as if the misplaced pixels are the ones that are needed to fill the rest of the rectangle.
tia
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement