Guest User

Untitled

a guest
Dec 9th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #include "vkwf.h"
  2.  
  3. int main()
  4. {
  5. VKWFWindow* window = VKWFCreateWindow("Test Window", 800, 600);
  6.  
  7. while (!VKWFWindowShouldClose(window))
  8. {
  9. VKWFWindowUpdate(window);
  10. }
  11.  
  12. free(window);
  13.  
  14. return 0;
  15. }
  16.  
  17. #pragma once
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. #ifdef VKWF_PLATFORM_WINDOWS
  24. #include "win32_window.h"
  25. #elif VKWF_PLATFORM_MACOS
  26. #include "macos_window.h"
  27. #elif VKWF_PLATFORM_LINUX
  28. #include "linux_window.h"
  29. #endif
  30.  
  31. VKWFWindow* VKWFCreateWindow(const char* title, int width, int height)
  32. {
  33. return VKWFPlatformCreateWindow(title, width, height);
  34. }
  35.  
  36. VKWFBool VKWFWindowShouldClose(VKWFWindow* window)
  37. {
  38. return VKWFPlatformWindowShouldClose(window);
  39. }
  40.  
  41. void VKWFWindowUpdate(VKWFWindow* window)
  42. {
  43. VKWFPlatformUpdate(window);
  44. }
  45.  
  46. void VKWFDestroyWindow(VKWFWindow* window)
  47. {
  48. VKWFPlatformDestroyWindow(window);
  49. }
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.  
  55. #define VKWFPlatformCreateWindow(title,width,height) VKWFWin32CreateWindow(title,width,height)
  56. #define VKWFPlatformWindowShouldClose(window) VKWFWin32WindowShouldClose(window)
  57. #define VKWFPlatformUpdate(window) VKWFWin32Update(window)
  58. #define VKWFPlatformDestroyWindow(window) VKWFWin32DestroyWindow(window)
Add Comment
Please, Sign In to add comment