20 lines
1.5 KiB
Plaintext
20 lines
1.5 KiB
Plaintext
#include "glfw_function_table.h"
|
|
#include <string.h>
|
|
|
|
void LoadGLFWFunctions(GLFWFunctionTable* table) {
|
|
table->glfwInit = (int (*)(void))glfwGetProcAddress("glfwInit");
|
|
table->glfwTerminate = (void (*)(void))glfwGetProcAddress("glfwTerminate");
|
|
table->glfwInitHint = (void (*)(int, int))glfwGetProcAddress("glfwInitHint");
|
|
table->glfwGetVersionString = (const char* (*)(void))glfwGetProcAddress("glfwGetVersionString");
|
|
table->glfwGetError = (int (*)(const char**))glfwGetProcAddress("glfwGetError");
|
|
table->glfwGetMonitors = (GLFWmonitor** (*)(int*))glfwGetProcAddress("glfwGetMonitors");
|
|
table->glfwGetPrimaryMonitor = (GLFWmonitor* (*)(void))glfwGetProcAddress("glfwGetPrimaryMonitor");
|
|
table->glfwGetMonitorPos = (void (*)(GLFWmonitor*, int*, int*))glfwGetProcAddress("glfwGetMonitorPos");
|
|
table->glfwCreateWindow = (GLFWwindow* (*)(int, int, const char*, GLFWmonitor*, GLFWwindow*))glfwGetProcAddress("glfwCreateWindow");
|
|
table->glfwDestroyWindow = (void (*)(GLFWwindow*))glfwGetProcAddress("glfwDestroyWindow");
|
|
table->glfwWindowShouldClose = (int (*)(GLFWwindow*))glfwGetProcAddress("glfwWindowShouldClose");
|
|
table->glfwSetWindowShouldClose = (void (*)(GLFWwindow*, int))glfwGetProcAddress("glfwSetWindowShouldClose");
|
|
table->glfwPollEvents = (void (*)(void))glfwGetProcAddress("glfwPollEvents");
|
|
table->glfwSwapBuffers = (void (*)(GLFWwindow*))glfwGetProcAddress("glfwSwapBuffers");
|
|
table->glfwGetProcAddress = (GLFWglproc (*)(const char*))glfwGetProcAddress("glfwGetProcAddress");
|
|
} |