You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to reproduce: modify any tutorial example. void ShadowMapFromCodeGameState::update( float timeSinceLast ) { TutorialGameState::update( timeSinceLast ); mGraphicsSystem->getRenderWindow() ->getTexture()->writeContentsToFile("a.png",0,0); }
On linux, this works fine, but on mac, it crashes because srcTextureMetal->getFinalTextureName()==NULL. Is there any easy workaround?
It might be too much information, but…
I have been using macos's "CGWindowListCreateImage" method instead of writeContentsFile on Mac. But now that macos 15 deprecated the CGWindowListCreateImage method, there is no way to capture exactly one screenshot for each timestep. The Apple's new ScreenshotKit framework doesn't seem to work with C++/objective C.
The text was updated successfully, but these errors were encountered:
taesoobear
changed the title
crashes when using screen capture on mac. (ogre-next v2.3)
crashes when using screen capture on mac. (ogre-next v2.3 and v3)
Feb 22, 2025
This only works if you download before you or OgreNext calls Window::swapBuffers. If you want to download after Window::swapBuffers, you need to call setManualSwapRelease and performManualRelease. See documentation for an example.
This API may not be available in OgreNext 2.3. If you need this to work in 2.3, a workaround is to render to an offscreen RenderTexture and download that instead. The problem arises from Window being a special case in Metal due to how the swapchain is handled.
How to reproduce: modify any tutorial example.
void ShadowMapFromCodeGameState::update( float timeSinceLast ) { TutorialGameState::update( timeSinceLast ); mGraphicsSystem->getRenderWindow() ->getTexture()->writeContentsToFile("a.png",0,0); }
On linux, this works fine, but on mac, it crashes because srcTextureMetal->getFinalTextureName()==NULL. Is there any easy workaround?
It might be too much information, but…
I have been using macos's "CGWindowListCreateImage" method instead of writeContentsFile on Mac. But now that macos 15 deprecated the CGWindowListCreateImage method, there is no way to capture exactly one screenshot for each timestep. The Apple's new ScreenshotKit framework doesn't seem to work with C++/objective C.
Thank you!
The text was updated successfully, but these errors were encountered: