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:
parent
4aae31ad5e
commit
58ccf0ba82
6 changed files with 44 additions and 28 deletions
|
@ -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>();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue