blob: af149b5c477c36af4265ecd859529adef94de398 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#pragma once
#ifdef STELA_API_VULKAN
#define GLFW_INCLUDE_VULKAN
#include "vk_common.h"
#else
#define GLFW_INCLUDE_NONE
#endif
#include <GLFW/glfw3.h>
#include "window.h"
#if defined STELA_API_DX11
#define GLFW_NATIVE_INCLUDE_NONE
#define GLFW_EXPOSE_NATIVE_WIN32
#include <GLFW/glfw3native.h>
#elif defined STELA_USE_EGL
#define GLFW_NATIVE_INCLUDE_NONE
#define GLFW_EXPOSE_NATIVE_EGL
#include <GLFW/glfw3native.h>
#endif
struct stl_glfw_global {
GLFWwindow *master_window;
GLFWcursor *cursors[STELA_CURSOR_HIDDEN];
};
struct stl_window_glfw {
struct stl_window w;
GLFWwindow *window;
f32 scale_x;
f32 scale_y;
struct {
s32 x;
s32 y;
s32 width;
s32 height;
} prev;
};
|