mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
GUI: DirectX 11 render backend, part 7
now with texture workaround
This commit is contained in:
parent
1ffa80e845
commit
6933446d8a
1 changed files with 11 additions and 1 deletions
|
@ -1231,7 +1231,17 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
}
|
||||
}
|
||||
|
||||
memcpy(dataT,data,sampleTexW*sampleTexH*sizeof(unsigned int));
|
||||
if ((pitch>>2)==sampleTexW) {
|
||||
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);
|
||||
delete[] data;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue