Browse Source

Fixed linked lib issues.

OpenGL now loading correctly.
No longer segfaults, but hangs on "Disabled Audio"
Thomas Buck 11 years ago
parent
commit
7227729789
6 changed files with 15 additions and 16 deletions
  1. 6
    2
      Makefile
  2. 1
    1
      src/Md3AnimModel.cpp
  3. 1
    1
      src/PSKModel.cpp
  4. 4
    2
      src/Render.cpp
  5. 2
    8
      src/SDLSystem.cpp
  6. 1
    2
      src/System.cpp

+ 6
- 2
Makefile View File

90
 	-DVERSION=\"\\\"$(NAME)-$(VERSION)-$(BUILD_ID)\\\"\" \
90
 	-DVERSION=\"\\\"$(NAME)-$(VERSION)-$(BUILD_ID)\\\"\" \
91
 	-DBUILD_HOST=\"\\\"$(BUILD_HOST)\\\"\"
91
 	-DBUILD_HOST=\"\\\"$(BUILD_HOST)\\\"\"
92
 
92
 
93
-LD_FLAGS=-L/opt/X11/lib -L/opt/local/lib -lXmu -lXt -lSM -lICE -lXext -lX11 -lXi \
94
-	-lGL -lGLU -lm $(BASE_LIBS)
93
+LD_FLAGS=-L/opt/X11/lib -lXmu -lXt -lSM -lICE -lXext -lX11 -lXi \
94
+	 -lm $(BASE_LIBS)
95
+
96
+ifneq ($(UNAME),Darwin)
97
+LD_FLAGS+=-lGL -lGLU
98
+endif
95
 
99
 
96
 RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
100
 RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
97
 	-fomit-frame-pointer -fexpensive-optimizations -O2
101
 	-fomit-frame-pointer -fexpensive-optimizations -O2

+ 1
- 1
src/Md3AnimModel.cpp View File

2107
 void init_gl(unsigned int width, unsigned int height)
2107
 void init_gl(unsigned int width, unsigned int height)
2108
 {
2108
 {
2109
 	// Print driver support information
2109
 	// Print driver support information
2110
-	printf("\n\n\t## GL Driver Info ##\n");
2110
+	printf("\n\n\t## GL Driver Info 4 ##\n");
2111
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
2111
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
2112
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
2112
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
2113
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));
2113
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));

+ 1
- 1
src/PSKModel.cpp View File

2342
 void init_gl(unsigned int width, unsigned int height)
2342
 void init_gl(unsigned int width, unsigned int height)
2343
 {
2343
 {
2344
 	// Print driver support information
2344
 	// Print driver support information
2345
-	printf("\n\n\t## GL Driver Info ##\n");
2345
+	printf("\n\n\t## GL Driver Info 3 ##\n");
2346
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
2346
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
2347
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
2347
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
2348
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));
2348
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));

+ 4
- 2
src/Render.cpp View File

486
 	}
486
 	}
487
 
487
 
488
 	// Print driver support information
488
 	// Print driver support information
489
-	printf("\n\n\t## GL Driver Info ##\n");
489
+	printf("\n\n\t## GL Driver Info 2 ##\n");
490
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
490
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
491
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
491
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
492
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));
492
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));
493
 	printf("\tExtensions : %s\n\n\n", (char*)glGetString(GL_EXTENSIONS));
493
 	printf("\tExtensions : %s\n\n\n", (char*)glGetString(GL_EXTENSIONS));
494
 
494
 
495
-	// Testing for goodies
495
+    // Testing for goodies
496
 	// Mongoose 2001.12.31, Fixed string use to check for bad strings
496
 	// Mongoose 2001.12.31, Fixed string use to check for bad strings
497
 	s = (char*)glGetString(GL_EXTENSIONS);
497
 	s = (char*)glGetString(GL_EXTENSIONS);
498
 
498
 
596
 	glPolygonMode(GL_FRONT, GL_FILL);
596
 	glPolygonMode(GL_FRONT, GL_FILL);
597
 
597
 
598
 	glMatrixMode(GL_MODELVIEW);
598
 	glMatrixMode(GL_MODELVIEW);
599
+
600
+    printf("\nm O.o m\n");
599
 }
601
 }
600
 
602
 
601
 
603
 

+ 2
- 8
src/SDLSystem.cpp View File

36
 #endif
36
 #endif
37
 
37
 
38
 #ifdef HAVE_OPENGL
38
 #ifdef HAVE_OPENGL
39
-#ifdef __APPLE__
40
-#include <OpenGL/gl.h>
41
-#include <OpenGL/glu.h>
42
-#else
43
-#include <GL/gl.h>
44
-#include <GL/glu.h>
45
-#endif
39
+#include <SDL/SDL_opengl.h>
46
 #else
40
 #else
47
 #   error "SDLSystem requires -DHAVE_OPENGL"
41
 #   error "SDLSystem requires -DHAVE_OPENGL"
48
 #endif
42
 #endif
221
 
215
 
222
 	// Create GL context
216
 	// Create GL context
223
 	SDL_Init(SDL_INIT_VIDEO);
217
 	SDL_Init(SDL_INIT_VIDEO);
224
-	printf("@Created OpenGL Context...\n");
218
+	printf("@ Created OpenGL Context...\n");
225
 	atexit(SDL_Quit);
219
 	atexit(SDL_Quit);
226
 
220
 
227
 	m_width = width;
221
 	m_width = width;

+ 1
- 2
src/System.cpp View File

517
 {
517
 {
518
 	char *s;
518
 	char *s;
519
 
519
 
520
-
521
 	// Print driver support information
520
 	// Print driver support information
522
-	printf("\n\n\t## GL Driver Info ##\n");
521
+	printf("\n\n\t## GL Driver Info 1 ##\n");
523
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
522
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
524
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
523
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
525
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));
524
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));

Loading…
Cancel
Save