mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Allow (basic) SetData with TextureSliceData
fixes wrong stride when first creating UL window
This commit is contained in:
@@ -83,12 +83,10 @@ abstract class UltralightWindow
|
||||
{
|
||||
void* pixels = ulBitmapLockPixels(bitmap);
|
||||
|
||||
// TODO: before first resize the stride is larger than expected
|
||||
uint32 width = ulBitmapGetWidth(bitmap);
|
||||
uint32 height = ulBitmapGetHeight(bitmap);
|
||||
uint32 stride = ulBitmapGetRowBytes(bitmap);
|
||||
|
||||
_texture.SetData<uint32>((.)pixels, 0, 0, width, height, 0, 0);
|
||||
_texture.SetData(TextureSliceData(pixels, stride, stride * height));
|
||||
|
||||
ulBitmapUnlockPixels(bitmap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user