Hello, i have the following code:
glfwSetErrorCallback(error_callback);
if (!glfwInit())
{
printf("Failed to initialize GLFW\n");
return -1;
}
engine.gameWin = glfwCreateWindow(engine.width, engine.height, engine.GetTitle().c_str(), NULL, NULL);
if (engine.gameWin == NULL)
{
printf("Failed to create GLFW Window.\n");
glfwTerminate();
return -1;
}
engine.width, engine,height and engine.GetTitle() is all not empty or null. They have their default value set.
and it compiled successfully but when i try to run it i get this error:
Assertion failed: (window != NULL), function glfwSetWindowTitle, file window.c, line 498.
What is the issue here? Please help me!