Browse Source

Removed gl driver setting

Thomas Buck 10 years ago
parent
commit
d9bd58771a
6 changed files with 8 additions and 38 deletions
  1. 8
    4
      ChangeLog.md
  2. 0
    3
      data/OpenRaider.ini
  3. 0
    3
      include/Window.h
  4. 0
    5
      src/Command.cpp
  5. 0
    10
      src/Window.cpp
  6. 0
    13
      src/WindowSDL.cpp

+ 8
- 4
ChangeLog.md View File

2
 
2
 
3
 ## OpenRaider (0.1.3) xythobuz <xythobuz@xythobuz.de>
3
 ## OpenRaider (0.1.3) xythobuz <xythobuz@xythobuz.de>
4
 
4
 
5
-	[ 20140702 ]
6
-	* Compiled successfully in Windows 7 using MinGW
7
-	* Added Windows setup script
8
-	* FontTRLE lps parser no longer using std::stoi
5
+    [ 20140703 ]
6
+    * Removed SDL_GL_LoadLibrary() call and corresponding
7
+      config file entry
8
+
9
+    [ 20140702 ]
10
+    * Compiled successfully in Windows 7 using MinGW
11
+    * Added Windows setup script
12
+    * FontTRLE lps parser no longer using std::stoi
9
 
13
 
10
     [ 20140626 ]
14
     [ 20140626 ]
11
     * ColorMode enum now global
15
     * ColorMode enum now global

+ 0
- 3
data/OpenRaider.ini View File

8
 set font       "$(datadir)/test.ttf"
8
 set font       "$(datadir)/test.ttf"
9
 # set font       "$(datadir)/font.pc"
9
 # set font       "$(datadir)/font.pc"
10
 
10
 
11
-# Not needed for Mac OS X
12
-set gldriver   "/usr/lib/libGL.so.1"
13
-
14
 # Windowing
11
 # Windowing
15
 set size       1280 720
12
 set size       1280 720
16
 set fullscreen false
13
 set fullscreen false

+ 0
- 3
include/Window.h View File

37
 
37
 
38
     virtual void swapBuffersGL() = 0;
38
     virtual void swapBuffersGL() = 0;
39
 
39
 
40
-    virtual void setDriver(const char *driver);
41
-
42
     virtual unsigned int getWidth();
40
     virtual unsigned int getWidth();
43
 
41
 
44
     virtual unsigned int getHeight();
42
     virtual unsigned int getHeight();
53
 
51
 
54
 protected:
52
 protected:
55
     bool mInit;
53
     bool mInit;
56
-    char *mDriver;
57
     bool mFullscreen;
54
     bool mFullscreen;
58
     bool mMousegrab;
55
     bool mMousegrab;
59
     unsigned int mWidth;
56
     unsigned int mWidth;

+ 0
- 5
src/Command.cpp View File

414
         getConsole().print("  audiodir   STRING");
414
         getConsole().print("  audiodir   STRING");
415
         getConsole().print("  datadir    STRING");
415
         getConsole().print("  datadir    STRING");
416
         getConsole().print("  font       STRING");
416
         getConsole().print("  font       STRING");
417
-        getConsole().print("  gldriver   STRING");
418
         getConsole().print("  size       INT INT");
417
         getConsole().print("  size       INT INT");
419
         getConsole().print("  fullscreen BOOL");
418
         getConsole().print("  fullscreen BOOL");
420
         getConsole().print("  audio      BOOL");
419
         getConsole().print("  audio      BOOL");
546
             return -3;
545
             return -3;
547
         }
546
         }
548
         getWindow().setFullscreen(fullscreen);
547
         getWindow().setFullscreen(fullscreen);
549
-    } else if (var.compare("gldriver") == 0) {
550
-        std::string driver;
551
-        command >> driver;
552
-        getWindow().setDriver(driver.c_str());
553
     } else if (var.compare("audio") == 0) {
548
     } else if (var.compare("audio") == 0) {
554
         bool audio = false;
549
         bool audio = false;
555
         if (!(command >> audio)) {
550
         if (!(command >> audio)) {

+ 0
- 10
src/Window.cpp View File

15
 #include "Window.h"
15
 #include "Window.h"
16
 
16
 
17
 Window::~Window() {
17
 Window::~Window() {
18
-    if (mDriver)
19
-        delete [] mDriver;
20
 }
18
 }
21
 
19
 
22
 unsigned int Window::getWidth() {
20
 unsigned int Window::getWidth() {
27
     return mHeight;
25
     return mHeight;
28
 }
26
 }
29
 
27
 
30
-void Window::setDriver(const char *driver) {
31
-    assert(driver != NULL);
32
-    assert(driver[0] != '\0');
33
-    assert(mInit == false);
34
-
35
-    mDriver = bufferString("%s", driver);
36
-}
37
-
38
 int Window::initializeGL() {
28
 int Window::initializeGL() {
39
     // Print driver support information
29
     // Print driver support information
40
     //printf("GL Vendor  : %s\n", glGetString(GL_VENDOR));
30
     //printf("GL Vendor  : %s\n", glGetString(GL_VENDOR));

+ 0
- 13
src/WindowSDL.cpp View File

16
 
16
 
17
 WindowSDL::WindowSDL() {
17
 WindowSDL::WindowSDL() {
18
     mInit = false;
18
     mInit = false;
19
-    mDriver = NULL;
20
     mWidth = DEFAULT_WIDTH;
19
     mWidth = DEFAULT_WIDTH;
21
     mHeight = DEFAULT_HEIGHT;
20
     mHeight = DEFAULT_HEIGHT;
22
     mFullscreen = false;
21
     mFullscreen = false;
84
         return -1;
83
         return -1;
85
     }
84
     }
86
 
85
 
87
-#if !(defined(__APPLE__) || defined(_WIN32))
88
-    assert(mDriver != NULL);
89
-    assert(mDriver[0] != '\0');
90
-
91
-    if (SDL_GL_LoadLibrary(mDriver) < 0) {
92
-        SDL_ClearError();
93
-        printf("Could not load OpenGL driver!\n");
94
-        printf("SDL_GL_LoadLibrary Error: %s\n", SDL_GetError());
95
-        return -2;
96
-    }
97
-#endif
98
-
99
     int flags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE;
86
     int flags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE;
100
     if (mFullscreen)
87
     if (mFullscreen)
101
         flags |= SDL_WINDOW_FULLSCREEN;
88
         flags |= SDL_WINDOW_FULLSCREEN;

Loading…
Cancel
Save