Pārlūkot izejas kodu

Adjusted include order, slop now checks OpenGL version.

naelstrof 7 gadus atpakaļ
vecāks
revīzija
badecc298b
2 mainītis faili ar 8 papildinājumiem un 1 dzēšanām
  1. 1
    1
      CMakeLists.txt
  2. 7
    0
      src/slop.cpp

+ 1
- 1
CMakeLists.txt Parādīt failu

@@ -21,7 +21,7 @@ endif()
21 21
 
22 22
 include_directories("${PROJECT_BINARY_DIR}")
23 23
 
24
-add_definitions(-DSLOP_VERSION="v6.3.45")
24
+add_definitions(-DSLOP_VERSION="v6.3.46")
25 25
 
26 26
 # The names have to be unique unfortunately.
27 27
 set(EXECUTABLE_NAME "slop")

+ 7
- 0
src/slop.cpp Parādīt failu

@@ -1,3 +1,6 @@
1
+#include "gl_core_3_0.hpp"
2
+#include <GL/gl.h>
3
+
1 4
 #include <chrono>
2 5
 #include <thread>
3 6
 
@@ -86,6 +89,10 @@ slop::SlopSelection slop::SlopSelect( slop::SlopOptions* options, bool* cancelle
86 89
         // If we have a compositor, we try using OpenGL
87 90
         try {
88 91
             window = new SlopWindow();
92
+	    if (!gl::sys::IsVersionGEQ(3,0)) {
93
+		delete window;
94
+                throw new std::runtime_error( "OpenGL version is not high enough, slop requires OpenGL 3.0!\nOpenGL accelleration is disabled. Use -o or -q to suppress this message." );
95
+	    }
89 96
             success = true;
90 97
         } catch( std::exception* e ) {
91 98
             errorstring += std::string(e->what()) + "\n";