Browse Source

Fixed tabbing, and uncommented the transparency

naelstrof 7 years ago
parent
commit
38d4f6c1a1
4 changed files with 9 additions and 9 deletions
  1. 3
    3
      CMakeLists.txt
  2. 3
    3
      src/glrectangle.cpp
  3. 1
    1
      src/slop.cpp
  4. 2
    2
      src/window.cpp

+ 3
- 3
CMakeLists.txt View File

21
 
21
 
22
 include_directories("${PROJECT_BINARY_DIR}")
22
 include_directories("${PROJECT_BINARY_DIR}")
23
 
23
 
24
-add_definitions(-DSLOP_VERSION="v5.3.26")
24
+add_definitions(-DSLOP_VERSION="v5.3.27")
25
 
25
 
26
 # The names have to be unique unfortunately.
26
 # The names have to be unique unfortunately.
27
 set(EXECUTABLE_NAME "slop")
27
 set(EXECUTABLE_NAME "slop")
62
                     ${GLM_INCLUDE_DIR}
62
                     ${GLM_INCLUDE_DIR}
63
                     ${XEXT_INCLUDE_DIR}
63
                     ${XEXT_INCLUDE_DIR}
64
                     ${GLX_INCLUDE_DIR}
64
                     ${GLX_INCLUDE_DIR}
65
-		    ${XRENDER_INCLUDE_DIR}
65
+                    ${XRENDER_INCLUDE_DIR}
66
                     ${OPENGL_INCLUDE_DIR})
66
                     ${OPENGL_INCLUDE_DIR})
67
 
67
 
68
 target_link_libraries(${LIBRARY_NAME} ${X11_LIBRARIES}
68
 target_link_libraries(${LIBRARY_NAME} ${X11_LIBRARIES}
69
                                       ${GLM_LIBRARIES}
69
                                       ${GLM_LIBRARIES}
70
                                       ${OPENGL_LIBRARIES}
70
                                       ${OPENGL_LIBRARIES}
71
                                       ${GLX_LIBRARY}
71
                                       ${GLX_LIBRARY}
72
-				      ${XRENDER_LIBRARY}
72
+                                      ${XRENDER_LIBRARY}
73
                                       ${XEXT_LIBRARIES})
73
                                       ${XEXT_LIBRARIES})
74
 
74
 
75
 target_link_libraries(${EXECUTABLE_NAME} ${LIBRARY_NAME})
75
 target_link_libraries(${EXECUTABLE_NAME} ${LIBRARY_NAME})

+ 3
- 3
src/glrectangle.cpp View File

214
 }
214
 }
215
 
215
 
216
 void slop::GLRectangle::draw( glm::mat4& matrix ) {
216
 void slop::GLRectangle::draw( glm::mat4& matrix ) {
217
-    //glEnable( GL_BLEND );
218
-    //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
217
+    glEnable( GL_BLEND );
218
+    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
219
     shader->bind();
219
     shader->bind();
220
     shader->setParameter( "projection", matrix );
220
     shader->setParameter( "projection", matrix );
221
     if ( highlight ) {
221
     if ( highlight ) {
238
         glDrawArrays(GL_TRIANGLES, 0, rectangle_vertCount );
238
         glDrawArrays(GL_TRIANGLES, 0, rectangle_vertCount );
239
     }
239
     }
240
     shader->unbind();
240
     shader->unbind();
241
-    //glDisable( GL_BLEND );
241
+    glDisable( GL_BLEND );
242
 }
242
 }
243
 
243
 
244
 glm::vec4 slop::GLRectangle::getRect() {
244
 glm::vec4 slop::GLRectangle::getRect() {

+ 1
- 1
src/slop.cpp View File

74
     std::string errorstring = "";
74
     std::string errorstring = "";
75
     SlopWindow* window;
75
     SlopWindow* window;
76
     // First we check if we have a compositor available
76
     // First we check if we have a compositor available
77
-	if ( x11->hasCompositor() && !options->noopengl ) {
77
+    if ( x11->hasCompositor() && !options->noopengl ) {
78
         // If we have a compositor, we try using OpenGL
78
         // If we have a compositor, we try using OpenGL
79
         try {
79
         try {
80
             window = new SlopWindow();
80
             window = new SlopWindow();

+ 2
- 2
src/window.cpp View File

11
                                    GLX_GREEN_SIZE, 1,
11
                                    GLX_GREEN_SIZE, 1,
12
                                    GLX_BLUE_SIZE, 1,
12
                                    GLX_BLUE_SIZE, 1,
13
                                    GLX_ALPHA_SIZE, 1,
13
                                    GLX_ALPHA_SIZE, 1,
14
-				   GLX_DEPTH_SIZE, 1,
14
+                                   GLX_DEPTH_SIZE, 1,
15
                                    None };
15
                                    None };
16
     int nelements;
16
     int nelements;
17
     int render_event_base, render_error_base;
17
     int render_event_base, render_error_base;
38
         }
38
         }
39
     }
39
     }
40
     if (i == nelements ) {
40
     if (i == nelements ) {
41
-	    throw new std::runtime_error( "No matching visuals available" );
41
+        throw new std::runtime_error( "No matching visuals available" );
42
     }
42
     }
43
 
43
 
44
     XSetWindowAttributes attributes;
44
     XSetWindowAttributes attributes;