add icon for window
This commit is contained in:
parent
1b2cc2d1c1
commit
3b6eb8b5f0
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
|
@ -36,6 +36,7 @@ void scroll_callback(GLFWwindow *window, double xoffset, double yoffset);
|
|||
void focus_callback(GLFWwindow *window, int focused);
|
||||
void processInput(GLFWwindow *window);
|
||||
|
||||
void glfwDump(GLFWwindow *window);
|
||||
|
||||
bool running = true;
|
||||
bool pausing = false;
|
||||
|
@ -70,8 +71,7 @@ int curr_y;
|
|||
int monitor_count;
|
||||
// GLFWmonitor **monitors;
|
||||
|
||||
// fps control
|
||||
// int fps = 120;
|
||||
GLFWimage icon;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -121,6 +121,9 @@ int main()
|
|||
return -1;
|
||||
}
|
||||
|
||||
icon.pixels = stbi_load("./icon.png", &icon.width, &icon.height, 0, STBI_rgb_alpha);
|
||||
glfwSetWindowIcon(window, 1, &icon);
|
||||
|
||||
// configure global opengl state
|
||||
// -----------------------------
|
||||
// glEnable(GL_DEPTH_TEST);
|
||||
|
@ -193,6 +196,8 @@ int main()
|
|||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LESS);
|
||||
|
||||
glfwDump(window);
|
||||
|
||||
// glfwSetCursorPos(window, curr_x + curr_width / 2, curr_y + curr_height / 2);
|
||||
// render loop
|
||||
// -----------
|
||||
|
|
Loading…
Reference in New Issue