-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hello, Zilize. V-PathTracer won't work on windows platform, because it doesn't initialize OpenGL before using any OpenGL function like glGenTextures.
As V-PathTracer uses glfw and glad, I try to add function initOpenGL() before showInit(), it works, as follows:
void Application::showInit() {
using namespace nanogui;
// A new function to initialize OpenGL
initOpenGL();
if(image->childCount()) image->removeChild(0);
mImageTexture = new GLTexture("../cache/init");
mImageTexture->loadFile("../cache/init.png");
imageView = new ImageView(image, mImageTexture->texture());
performLayout();
}
void Application::initOpenGL()
{
int status = gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
if (!status)
throw std::runtime_error("Failed to initialize OpenGL!");
}Thank you for your project, I have learned a lot.
Metadata
Metadata
Assignees
Labels
No labels