Browse Source

These things are not needed if you're not compiling with OpenGL.

Brian Callahan 9 years ago
parent
commit
15e4b04535
2 changed files with 8 additions and 0 deletions
  1. 4
    0
      src/main.cpp
  2. 4
    0
      src/shader.hpp

+ 4
- 0
src/main.cpp View File

253
     bool decorations = !options.nodecorations_flag;
253
     bool decorations = !options.nodecorations_flag;
254
     bool themeon = (bool)options.theme_given;
254
     bool themeon = (bool)options.theme_given;
255
     std::string theme = options.theme_arg;
255
     std::string theme = options.theme_arg;
256
+#ifdef OPENGL_ENABLED
256
     bool shadergiven = (bool)options.shader_given;
257
     bool shadergiven = (bool)options.shader_given;
258
+#endif
257
     std::string shader = options.shader_arg;
259
     std::string shader = options.shader_arg;
258
     struct timespec start, time;
260
     struct timespec start, time;
259
     int xoffset = 0;
261
     int xoffset = 0;
274
     }
276
     }
275
     std::string format = options.format_arg;
277
     std::string format = options.format_arg;
276
     bool magenabled = options.magnify_flag;
278
     bool magenabled = options.magnify_flag;
279
+#ifdef OPENGL_ENABLED
277
     float magstrength = options.magstrength_arg;
280
     float magstrength = options.magstrength_arg;
278
     if ( options.magpixels_arg < 0 ) {
281
     if ( options.magpixels_arg < 0 ) {
279
         fprintf( stderr, "Error: --magpixels < 0, it's an unsigned integer you twat. Stop trying to underflow me!\n" );
282
         fprintf( stderr, "Error: --magpixels < 0, it's an unsigned integer you twat. Stop trying to underflow me!\n" );
280
         return EXIT_FAILURE;
283
         return EXIT_FAILURE;
281
     }
284
     }
282
     unsigned int magpixels = (unsigned int)options.magpixels_arg;
285
     unsigned int magpixels = (unsigned int)options.magpixels_arg;
286
+#endif
283
     cmdline_parser_free( &options );
287
     cmdline_parser_free( &options );
284
 #ifndef OPENGL_ENABLED
288
 #ifndef OPENGL_ENABLED
285
     if ( opengl || themeon || magenabled ) {
289
     if ( opengl || themeon || magenabled ) {

+ 4
- 0
src/shader.hpp View File

6
 #include <string>
6
 #include <string>
7
 #include <cstdio>
7
 #include <cstdio>
8
 #include <vector>
8
 #include <vector>
9
+#ifdef OPENGL_ENABLED
9
 #include <glm/glm.hpp>
10
 #include <glm/glm.hpp>
10
 #include <glm/gtc/type_ptr.hpp>
11
 #include <glm/gtc/type_ptr.hpp>
11
 #include <GL/glew.h>
12
 #include <GL/glew.h>
13
+#endif
12
 #include <string>
14
 #include <string>
13
 #include <fstream>
15
 #include <fstream>
14
 #include <streambuf>
16
 #include <streambuf>
25
     void            unbind();
27
     void            unbind();
26
     void            setParameter( std::string name, int foo );
28
     void            setParameter( std::string name, int foo );
27
     void            setParameter( std::string name, float foo );
29
     void            setParameter( std::string name, float foo );
30
+#ifdef OPENGL_ENABLED
28
     void            setParameter( std::string name, glm::mat4 foo );
31
     void            setParameter( std::string name, glm::mat4 foo );
29
     void            setParameter( std::string name, glm::vec4 foo );
32
     void            setParameter( std::string name, glm::vec4 foo );
30
     void            setParameter( std::string name, glm::vec2 foo );
33
     void            setParameter( std::string name, glm::vec2 foo );
34
+#endif
31
     void            setAttribute( std::string name, unsigned int buffer, unsigned int stepsize );
35
     void            setAttribute( std::string name, unsigned int buffer, unsigned int stepsize );
32
     int             m_type;
36
     int             m_type;
33
 private:
37
 private: