Files
stgsharp/.vs/CopilotSnapshots/35034FC10B7A0D42B2D3A964032675D5/020E8EDCB484644083135806C6E36CA6/17B72F29C1CC21C3FDE7DDD63EF7F9FD
T

21 lines
1.6 KiB
Plaintext

#include "glfw_function_table.h"
#include <string.h>
void LoadGLFWFunctions(GLFWFunctionTable* table) {
memset(table, 0, sizeof(GLFWFunctionTable));
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");
}