diff --git a/examples/gears-gles2.c b/examples/gears-gles2.c index 7ded41eec..6e03c5a36 100644 --- a/examples/gears-gles2.c +++ b/examples/gears-gles2.c @@ -1125,12 +1125,19 @@ static void count_fps() } } +static void error_callback(int error, const char* description) +{ + fprintf(stderr, "Error: %s\n", description); +} + /* program entry */ int main(int argc, char *argv[]) { GLFWwindow* window; int width, height; + glfwSetErrorCallback(error_callback); + if( !glfwInit() ) { fprintf( stderr, "Failed to initialize GLFW\n" ); @@ -1142,14 +1149,13 @@ int main(int argc, char *argv[]) glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_DEPTH_BITS, 16); - window = glfwCreateWindow( 300, 300, "Gears GLES2", glfwGetPrimaryMonitor(), NULL ); + window = glfwCreatePositionedWindow( 100, 100, 500, 500, "Gears GLES2", NULL /*glfwGetPrimaryMonitor()*/, NULL ); if (!window) { fprintf( stderr, "Failed to open GLFW window\n" ); glfwTerminate(); exit( EXIT_FAILURE ); } - glfwSetWindowPos( window, 100, 100 ); // Set callback functions glfwSetFramebufferSizeCallback(window, reshape);