30 #include <glad/glad.h> 64 { 255, 255, 255, 255 }
72 unsigned char pixels[16 * 16 * 4];
76 for (y = 0; y < img.
width; y++)
78 for (x = 0; x < img.
height; x++)
80 if (
logo[y][x] ==
'0')
112 int main(
int argc,
char** argv)
118 fprintf(stderr,
"Failed to initialize GLFW\n");
127 fprintf(stderr,
"Failed to open GLFW window\n");
static int cur_icon_color
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
int main(int argc, char **argv)
static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods)
GLFWAPI int glfwInit(void)
Initializes the GLFW library.
#define GL_COLOR_BUFFER_BIT
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.
const unsigned char icon_colors[5][4]
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
GLAPI int gladLoadGLLoader(GLADloadproc)
static const textual_icon exit
GLFWAPI void glfwSetWindowShouldClose(GLFWwindow *window, int value)
Sets the close flag of the specified window.
static void set_icon(GLFWwindow *window, int icon_color)
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 glfwDestroyWindow(GLFWwindow *window)
Destroys the specified window and its context.
GLFWAPI void glfwTerminate(void)
Terminates the GLFW library.
struct GLFWwindow GLFWwindow
GLFWAPI void glfwSetWindowIcon(GLFWwindow *window, int count, const GLFWimage *images)
Sets the icon for the specified window.
GLFWAPI int glfwWindowShouldClose(GLFWwindow *window)
Checks the close flag of the specified window.