Browse Source

display unsupported extensions

Eduardo Bart 9 years ago
parent
commit
c33741d324
4 changed files with 24 additions and 12 deletions
  1. 3
    0
      AUTHORS
  2. 1
    7
      README.rdoc
  3. 0
    1
      modules/client_terminal/terminal.lua
  4. 20
    4
      src/framework/graphics/graphics.cpp

+ 3
- 0
AUTHORS View File

@@ -0,0 +1,3 @@
1
+edubart - leader developer (project creator) <edub4rt@gmail.com>
2
+andrefaramir - scripting (implemented battle, hotkeys, chat, ..) <andre_faramir@hotmail.com>
3
+baxnie - inactive (implemented first game functionality) <henrique_santiago93@hotmail.com>

+ 1
- 7
README.rdoc View File

@@ -31,15 +31,9 @@ We encourage you to contribute to OTClient! Please check out
31 31
 
32 32
 == Contact
33 33
 
34
-You have 3 options, post at http://otclient.info/ , talk directly with us at #otclient irc.freenode.net or send
34
+You have 3 options, use the forum at http://otclient.info/ , talk directly with us at #otclient irc.freenode.net or send
35 35
 an email directly to the project leader edub4rt@gmail.com
36 36
 
37
-== Authors
38
-
39
-* edubart (project creator and leader developer) <edub4rt@gmail.com>
40
-* baxnie (official developer) <henrique_santiago93@hotmail.com>
41
-* andrefaramir (official developer) <andre_faramir@hotmail.com>
42
-
43 37
 == License
44 38
 
45 39
 OTClient is made available under the MIT License, thus this means that you can do whatever you want, commercial, non-commercial, closed or open.

+ 0
- 1
modules/client_terminal/terminal.lua View File

@@ -126,7 +126,6 @@ function Terminal.init()
126 126
       poped = true
127 127
     end
128 128
   end
129
-  
130 129
 
131 130
   terminalButton = TopMenu.addLeftButton('terminalButton', 'Terminal (Ctrl + T)', 'terminal.png', Terminal.toggle)
132 131
   Keyboard.bindKeyDown('Ctrl+T', Terminal.toggle)

+ 20
- 4
src/framework/graphics/graphics.cpp View File

@@ -39,10 +39,26 @@ void Graphics::init()
39 39
     if(err != GLEW_OK)
40 40
         logFatal("Unable to init GLEW: ", glewGetErrorString(err));
41 41
 
42
-    if(!GLEW_ARB_vertex_program || !GLEW_ARB_vertex_shader ||
43
-       !GLEW_ARB_fragment_program || !GLEW_ARB_fragment_shader ||
44
-       !GLEW_ARB_texture_non_power_of_two || !GLEW_ARB_multitexture)
45
-        logFatal("Some OpenGL 2.0 extensions is not supported by your system graphics, please try updating your video drivers or buy a new hardware.");
42
+    const char *requiredExtensions[] = {
43
+        "GL_ARB_vertex_program",
44
+        "GL_ARB_vertex_shader",
45
+        "GL_ARB_fragment_program",
46
+        "GL_ARB_fragment_shader",
47
+        "GL_ARB_texture_non_power_of_two",
48
+        "GL_ARB_multitexture"
49
+    };
50
+
51
+    std::stringstream ss;
52
+    bool unsupported = false;
53
+    for(auto ext : requiredExtensions) {
54
+        if(!glewIsSupported(ext)) {
55
+            ss << ext << std::endl;
56
+            unsupported = true;
57
+        }
58
+    }
59
+
60
+    if(unsupported)
61
+        logFatal("The following OpenGL 2.0 extensions are not supported by your system graphics, please try updating your video drivers or buy a new hardware:\n", ss.str());
46 62
 
47 63
     m_useFBO = m_useFBO && GLEW_ARB_framebuffer_object;
48 64
     m_generateHardwareMipmaps = m_generateHardwareMipmaps && m_useFBO; // glGenerateMipmap is supported when FBO is

Loading…
Cancel
Save