update bundled_deps

This commit is contained in:
QIDI TECH
2024-11-09 14:05:44 +08:00
parent 17c9bfd127
commit cfc606fea9
1662 changed files with 710 additions and 168 deletions

View File

@@ -0,0 +1,30 @@
#include "background_window.h"
#include <iostream>
IGL_INLINE bool igl::opengl::glfw::background_window(GLFWwindow* & window)
{
if(!glfwInit()) return false;
glfwSetErrorCallback([](int id,const char* m){std::cerr<<m<<std::endl;});
glfwWindowHint(GLFW_SAMPLES, 4);
// Use 3.2 core profile
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
// Use background window
glfwWindowHint(GLFW_VISIBLE, GL_FALSE);
window = glfwCreateWindow(1, 1,"", NULL, NULL);
if(!window) return false;
glfwMakeContextCurrent(window);
if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress))
{
printf("Failed to load OpenGL and its extensions");
}
glGetError(); // pull and safely ignore unhandled errors like GL_INVALID_ENUM
return true;
}
#ifdef IGL_STATIC_LIBRARY
// Explicit template instantiation
#endif