![]() |
|
DXViewportView.RenderToBitmap no longer working - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab3d.DXEngine (https://forum.ab4d.com/forumdisplay.php?fid=11) +--- Thread: DXViewportView.RenderToBitmap no longer working (/showthread.php?tid=4477) |
DXViewportView.RenderToBitmap no longer working - SLH - 02-28-2025 Hello, Just updating AB4D to the latest version from v7.1 and it looks like it has broken some of my code for doing an offscreen render then saving to a bitmap. Calling RendToBitmap on a DXViewportView used to work. But now it's just a blank image. Rendering the camera still works, but is very slow. Any ideas on a fix? Best regards, Simon Code snippet below Code: var viewport3D = new Viewport3D();RE: DXViewportView.RenderToBitmap no longer working - abenedik - 03-03-2025 I am sorry that the new version does not work anymore with your code. I have fixed that so this will work again in the next version. Unitil then, please reorder the code so that the size of the DXViewportView is set before calling the InitializeScene: Code: var viewport3D = new Viewport3D();After that the directxViewPort.RenderToBitmap will produce the bitmap with rendered 3D objects. RE: DXViewportView.RenderToBitmap no longer working - SLH - 03-03-2025 Excellent - that seems to have fixed it. Thanks again for your fast help! |