Advertisement
theguild42

Vulkan + FLTK

May 15th, 2022
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <FL/Fl.H>
  2. #include <FL/Fl_Window.H>
  3. #include <FL/Fl_Box.H>
  4.  
  5. #include <vulkan/vulkan.h>
  6. #include <iostream>
  7. #include <stdexcept>
  8. #include <cstdlib>
  9.  
  10. const uint32_t WIDTH = 800;
  11. const uint32_t HEIGHT = 600;
  12.  
  13. class HelloTriangleApplication{
  14. public:
  15.   void run(){
  16.     initWindow();
  17.     initVulkan();
  18.     mainLoop();
  19.     cleanup();
  20.   }
  21.  
  22. private:
  23.   Fl_Window *window;
  24.  
  25.   void initWindow(){
  26.     window = new Fl_Window(WIDTH,HEIGHT, "Hello Triangle");
  27.    
  28.   }
  29.  
  30.   void initVulkan(){
  31.   }
  32.  
  33.   void mainLoop(){
  34.    
  35.   }
  36.  
  37.   void cleanup(){
  38.     window->end();
  39.     window->show();
  40.   }
  41. };
  42.    
  43.  
  44. int main() {
  45.  
  46.   HelloTriangleApplication app;
  47.  
  48. }
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement