When i load image 512x512128x128, ... or some size when width and height is same size, it works nice, but if i load image with width and height different, i get the error, a exmple: 512x128
The error is in ClickableTransparentOverlay.ImGuiRenderer.CreateImageTexture when the method calls the device.CreateTexture2D(...)
The error message is System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
When i load image
512x512
128x128
, ... or some size when width and height is same size, it works nice, but if i load image with width and height different, i get the error, a exmple:512x128
The error is inClickableTransparentOverlay.ImGuiRenderer.CreateImageTexture
when the method calls thedevice.CreateTexture2D(...)
The error message isSystem.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
The problem is in https://github.com/zaafar/ClickableTransparentOverlay/blob/49a3011d7f2ff514489fadf559741ae5355a7d71/ClickableTransparentOverlay/ImGuiRenderer.cs#L213
Looking to the
Texture2DDescription
, the parameters isformat
,width
,height
,.....
, in the current code, usingimage.Width
inheight
param