| 1305 | } |
| 1306 | |
| 1307 | void RenderViewImpl::onGLFWWindowSizeCallback(GLFWwindow* /*window*/, int w, int h) |
| 1308 | { |
| 1309 | if (w && h && _resolutionPolicy != ResolutionPolicy::UNKNOWN) |
| 1310 | { |
| 1311 | handleWindowSize(w, h); |
| 1312 | |
| 1313 | #if defined(AX_USE_METAL) |
| 1314 | // update metal attachment texture size. |
| 1315 | int fbWidth, fbHeight; |
| 1316 | glfwGetFramebufferSize(_mainWindow, &fbWidth, &fbHeight); |
| 1317 | backend::UtilsMTL::resizeDefaultAttachmentTexture(fbWidth, fbHeight); |
| 1318 | #endif |
| 1319 | |
| 1320 | Size size(w, h); |
| 1321 | Director::getInstance()->getEventDispatcher()->dispatchCustomEvent(RenderViewImpl::EVENT_WINDOW_RESIZED, &size); |
| 1322 | } |
| 1323 | } |
| 1324 | |
| 1325 | void RenderViewImpl::onGLFWWindowIconifyCallback(GLFWwindow* /*window*/, int iconified) |
| 1326 | { |
no test coverage detected