30 #include <glad/glad.h> 40 fprintf(stderr,
"Error: %s\n", description);
51 return (
float) rand() / (float)
RAND_MAX;
58 srand((
unsigned int) time(
NULL));
80 float l = (float) sqrt(r * r +
g *
g +
b *
b);
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.
void *(* GLADloadproc)(const char *name)
static GLFWwindow * window
GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
Sets the error callback.
static void error_callback(int error, const char *description)
GLFWAPI int glfwInit(void)
Initializes the GLFW library.
#define GL_COLOR_BUFFER_BIT
GLint GLsizei GLsizei height
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.
GLAPI int gladLoadGLLoader(GLADloadproc)
static const textual_icon exit
GLFWAPI void glfwSetWindowShouldClose(GLFWwindow *window, int value)
Sets the close flag of the specified window.
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
GLFWAPI void glfwWaitEventsTimeout(double timeout)
Waits with timeout until events are queued and processes them.
GLFWAPI void glfwDestroyWindow(GLFWwindow *window)
Destroys the specified window and its context.
GLFWAPI void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the framebuffer of the specified window.
GLFWAPI void glfwTerminate(void)
Terminates the GLFW library.
static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods)
struct GLFWwindow GLFWwindow
GLFWAPI int glfwWindowShouldClose(GLFWwindow *window)
Checks the close flag of the specified window.