소스 검색

Fixed tabbing, and uncommented the transparency

naelstrof 7 년 전
부모
커밋
38d4f6c1a1
4개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  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 파일 보기

@@ -21,7 +21,7 @@ endif()
21 21
 
22 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 26
 # The names have to be unique unfortunately.
27 27
 set(EXECUTABLE_NAME "slop")
@@ -62,14 +62,14 @@ include_directories(${X11_INCLUDE_DIR}
62 62
                     ${GLM_INCLUDE_DIR}
63 63
                     ${XEXT_INCLUDE_DIR}
64 64
                     ${GLX_INCLUDE_DIR}
65
-		    ${XRENDER_INCLUDE_DIR}
65
+                    ${XRENDER_INCLUDE_DIR}
66 66
                     ${OPENGL_INCLUDE_DIR})
67 67
 
68 68
 target_link_libraries(${LIBRARY_NAME} ${X11_LIBRARIES}
69 69
                                       ${GLM_LIBRARIES}
70 70
                                       ${OPENGL_LIBRARIES}
71 71
                                       ${GLX_LIBRARY}
72
-				      ${XRENDER_LIBRARY}
72
+                                      ${XRENDER_LIBRARY}
73 73
                                       ${XEXT_LIBRARIES})
74 74
 
75 75
 target_link_libraries(${EXECUTABLE_NAME} ${LIBRARY_NAME})

+ 3
- 3
src/glrectangle.cpp 파일 보기

@@ -214,8 +214,8 @@ slop::GLRectangle::~GLRectangle() {
214 214
 }
215 215
 
216 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 219
     shader->bind();
220 220
     shader->setParameter( "projection", matrix );
221 221
     if ( highlight ) {
@@ -238,7 +238,7 @@ void slop::GLRectangle::draw( glm::mat4& matrix ) {
238 238
         glDrawArrays(GL_TRIANGLES, 0, rectangle_vertCount );
239 239
     }
240 240
     shader->unbind();
241
-    //glDisable( GL_BLEND );
241
+    glDisable( GL_BLEND );
242 242
 }
243 243
 
244 244
 glm::vec4 slop::GLRectangle::getRect() {

+ 1
- 1
src/slop.cpp 파일 보기

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

+ 2
- 2
src/window.cpp 파일 보기

@@ -11,7 +11,7 @@ slop::SlopWindow::SlopWindow() {
11 11
                                    GLX_GREEN_SIZE, 1,
12 12
                                    GLX_BLUE_SIZE, 1,
13 13
                                    GLX_ALPHA_SIZE, 1,
14
-				   GLX_DEPTH_SIZE, 1,
14
+                                   GLX_DEPTH_SIZE, 1,
15 15
                                    None };
16 16
     int nelements;
17 17
     int render_event_base, render_error_base;
@@ -38,7 +38,7 @@ slop::SlopWindow::SlopWindow() {
38 38
         }
39 39
     }
40 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 44
     XSetWindowAttributes attributes;