1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Fix some smaller issues with texture/image handling

This commit is contained in:
sfan5 2024-11-08 13:15:20 +01:00
parent 4aae31ad5e
commit 58ccf0ba82
6 changed files with 44 additions and 28 deletions

View file

@ -24,7 +24,7 @@ void InitInterlacedMaskStep::run(PipelineContext &context)
last_mask = mask;
auto size = mask->getSize();
u8 *data = reinterpret_cast<u8 *>(mask->lock());
u8 *data = reinterpret_cast<u8 *>(mask->lock(video::ETLM_WRITE_ONLY));
for (u32 j = 0; j < size.Height; j++) {
u8 val = j % 2 ? 0xff : 0x00;
memset(data, val, 4 * size.Width);
@ -74,4 +74,4 @@ void populateInterlacedPipeline(RenderPipeline *pipeline, Client *client)
merge->setRenderSource(buffer);
merge->setRenderTarget(pipeline->createOwned<ScreenTarget>());
pipeline->addStep<DrawHUD>();
}
}