GUI: DirectX 11 render backend, part 7
now with texture workaround
This commit is contained in:
parent
1ffa80e845
commit
6933446d8a
|
@ -1231,7 +1231,17 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((pitch>>2)==sampleTexW) {
|
||||||
memcpy(dataT,data,sampleTexW*sampleTexH*sizeof(unsigned int));
|
memcpy(dataT,data,sampleTexW*sampleTexH*sizeof(unsigned int));
|
||||||
|
} else {
|
||||||
|
int srcY=0;
|
||||||
|
int destY=0;
|
||||||
|
for (int i=0; i<sampleTexH; i++) {
|
||||||
|
memcpy(&dataT[destY],&data[srcY],sampleTexW*sizeof(unsigned int));
|
||||||
|
srcY+=sampleTexW;
|
||||||
|
destY+=pitch>>2;
|
||||||
|
}
|
||||||
|
}
|
||||||
rend->unlockTexture(sampleTex);
|
rend->unlockTexture(sampleTex);
|
||||||
delete[] data;
|
delete[] data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue