33 #include <glad/glad.h> 52 fprintf(stderr,
"Error: %s\n", description);
86 {
NULL,
"Red", 1.f, 0.f, 0.f, 0 },
87 {
NULL,
"Green", 0.f, 1.f, 0.f, 0 },
88 {
NULL,
"Blue", 0.f, 0.f, 1.f, 0 }
99 for (i = 0; i <
count; i++)
120 for (i = 0; i <
count; i++)
125 fprintf(stderr,
"Failed to create secondary thread\n");
136 for (i = 0; i <
count; i++)
143 for (i = 0; i <
count; i++)
146 for (i = 0; i <
count; i++)
GLboolean GLboolean GLboolean b
The header of the GLFW 3 API.
GLFWAPI GLFWglproc glfwGetProcAddress(const char *procname)
Returns the address of the specified function for the current context.
static int thread_main(void *data)
void *(* GLADloadproc)(const char *name)
GLFWAPI void glfwHideWindow(GLFWwindow *window)
Hides the specified window.
int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
Sets the error callback.
static volatile int running
GLFWAPI int glfwInit(void)
Initializes the GLFW library.
#define GL_COLOR_BUFFER_BIT
static void error_callback(int error, const char *description)
GLFWAPI void glfwSwapInterval(int interval)
Sets the swap interval for the current context.
GLFWAPI void glfwSwapBuffers(GLFWwindow *window)
Swaps the front and back buffers of the specified window.
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *window)
Makes the context of the specified window current for the calling thread.
int thrd_join(thrd_t thr, int *res)
GLAPI int gladLoadGLLoader(GLADloadproc)
static const textual_icon exit
GLFWAPI void glfwSetWindowPos(GLFWwindow *window, int xpos, int ypos)
Sets the position of the client area of the specified window.
GLFWAPI void glfwSetWindowShouldClose(GLFWwindow *window, int value)
Sets the close flag of the specified window.
GLFWAPI void glfwWaitEvents(void)
Waits until events are queued and processes them.
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
GLFWAPI void glfwShowWindow(GLFWwindow *window)
Makes the specified window visible.
GLFWAPI void glfwTerminate(void)
Terminates the GLFW library.
static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods)
#define GLFW_VISIBLE
Window visibility window hint and attribute.
struct GLFWwindow GLFWwindow
GLFWAPI void glfwWindowHint(int hint, int value)
Sets the specified window hint to the desired value.
GLFWAPI int glfwWindowShouldClose(GLFWwindow *window)
Checks the close flag of the specified window.