Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "vkwf.h"
- int main()
- {
- VKWFWindow* window = VKWFCreateWindow("Test Window", 800, 600);
- while (!VKWFWindowShouldClose(window))
- {
- VKWFWindowUpdate(window);
- }
- free(window);
- return 0;
- }
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- #ifdef VKWF_PLATFORM_WINDOWS
- #include "win32_window.h"
- #elif VKWF_PLATFORM_MACOS
- #include "macos_window.h"
- #elif VKWF_PLATFORM_LINUX
- #include "linux_window.h"
- #endif
- VKWFWindow* VKWFCreateWindow(const char* title, int width, int height)
- {
- return VKWFPlatformCreateWindow(title, width, height);
- }
- VKWFBool VKWFWindowShouldClose(VKWFWindow* window)
- {
- return VKWFPlatformWindowShouldClose(window);
- }
- void VKWFWindowUpdate(VKWFWindow* window)
- {
- VKWFPlatformUpdate(window);
- }
- void VKWFDestroyWindow(VKWFWindow* window)
- {
- VKWFPlatformDestroyWindow(window);
- }
- #ifdef __cplusplus
- }
- #endif
- #define VKWFPlatformCreateWindow(title,width,height) VKWFWin32CreateWindow(title,width,height)
- #define VKWFPlatformWindowShouldClose(window) VKWFWin32WindowShouldClose(window)
- #define VKWFPlatformUpdate(window) VKWFWin32Update(window)
- #define VKWFPlatformDestroyWindow(window) VKWFWin32DestroyWindow(window)
Add Comment
Please, Sign In to add comment