Commit 603fe3a1 authored by PoroCYon's avatar PoroCYon Committed by Gargaj
Browse files

Print an error if OpenGL 4.1 isn't supported (cf #56) (#57)

* Print an error if OpenGL 4.1 isn't supported (cf #56)

* fix typo
parent 7ba8d8a3
......@@ -16,8 +16,13 @@ The tool was originally conceived and implemented after the Revision 2014 demosc
- F11 or Ctrl/Cmd-f: hide shader overlay
- Alt-F4 or Shift+Escape: exbobolate your planet
## Requirements
On Windows, both DirectX 9 and 11 are supported.
For the OpenGL version (for any platform), at least OpenGL 4.1 is required.
## Configuration
Create a ```config.json``` with e.g. the following contents: (all fields are optional)
Create a `config.json` with e.g. the following contents: (all fields are optional)
``` javascript
{
"window":{ /* default window size / state, if there's a setup dialog, it will override it */
......
......@@ -188,6 +188,14 @@ namespace Renderer
GLuint pbo[2];
static void error_callback(int error, const char *description) {
switch (error) {
case GLFW_API_UNAVAILABLE:
printf("OpenGL is unavailable: ");
break;
case GLFW_VERSION_UNAVAILABLE:
printf("OpenGL 4.1 (the minimum requirement) is not available: ");
break;
}
printf("%s\n", description);
}
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment