Advertisement
RealDevMashup

Untitled

Sep 17th, 2023
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. //.cpp
  2.  
  3. void glApp::handleFramebufferResize(int width, int height)
  4. {
  5. glViewport(0, 0, width, height);
  6.  
  7. //Imgui menues
  8. menuWidth = width;
  9. menuHieght = height;
  10.  
  11. MASH_cout << menuWidth;
  12. }
  13.  
  14. void glApp::framebuffer_size_callback(GLFWwindow* window, int width, int height)
  15. {
  16. std::cout << "Framebuffer size changed: " << width << "x" << height << std::endl;
  17.  
  18. glApp* app = static_cast<glApp*>(glfwGetWindowUserPointer(window));
  19.  
  20. if (app) {
  21. app->handleFramebufferResize(width, height);
  22. }
  23. }
  24.  
  25. //.h
  26. void handleFramebufferResize(int, int);
  27. static void framebuffer_size_callback(GLFWwindow*, int, int);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement