Procházet zdrojové kódy

Fixed linked lib issues.

OpenGL now loading correctly.
No longer segfaults, but hangs on "Disabled Audio"
Thomas Buck před 11 roky
rodič
revize
7227729789
6 změnil soubory, kde provedl 15 přidání a 16 odebrání
  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 Zobrazit soubor

@@ -90,8 +90,12 @@ BASE_CFLAGS=-Wall $(BASE_DEFS) \
90 90
 	-DVERSION=\"\\\"$(NAME)-$(VERSION)-$(BUILD_ID)\\\"\" \
91 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 100
 RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
97 101
 	-fomit-frame-pointer -fexpensive-optimizations -O2

+ 1
- 1
src/Md3AnimModel.cpp Zobrazit soubor

@@ -2107,7 +2107,7 @@ void shutdown_gl()
2107 2107
 void init_gl(unsigned int width, unsigned int height)
2108 2108
 {
2109 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 2111
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
2112 2112
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
2113 2113
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));

+ 1
- 1
src/PSKModel.cpp Zobrazit soubor

@@ -2342,7 +2342,7 @@ void shutdown_gl()
2342 2342
 void init_gl(unsigned int width, unsigned int height)
2343 2343
 {
2344 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 2346
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
2347 2347
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
2348 2348
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));

+ 4
- 2
src/Render.cpp Zobrazit soubor

@@ -486,13 +486,13 @@ void Render::Init(int width, int height, bool fast_card)
486 486
 	}
487 487
 
488 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 490
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
491 491
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
492 492
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));
493 493
 	printf("\tExtensions : %s\n\n\n", (char*)glGetString(GL_EXTENSIONS));
494 494
 
495
-	// Testing for goodies
495
+    // Testing for goodies
496 496
 	// Mongoose 2001.12.31, Fixed string use to check for bad strings
497 497
 	s = (char*)glGetString(GL_EXTENSIONS);
498 498
 
@@ -596,6 +596,8 @@ void Render::Init(int width, int height, bool fast_card)
596 596
 	glPolygonMode(GL_FRONT, GL_FILL);
597 597
 
598 598
 	glMatrixMode(GL_MODELVIEW);
599
+
600
+    printf("\nm O.o m\n");
599 601
 }
600 602
 
601 603
 

+ 2
- 8
src/SDLSystem.cpp Zobrazit soubor

@@ -36,13 +36,7 @@
36 36
 #endif
37 37
 
38 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 40
 #else
47 41
 #   error "SDLSystem requires -DHAVE_OPENGL"
48 42
 #endif
@@ -221,7 +215,7 @@ void SDLSystem::initVideo(unsigned int width, unsigned int height,
221 215
 
222 216
 	// Create GL context
223 217
 	SDL_Init(SDL_INIT_VIDEO);
224
-	printf("@Created OpenGL Context...\n");
218
+	printf("@ Created OpenGL Context...\n");
225 219
 	atexit(SDL_Quit);
226 220
 
227 221
 	m_width = width;

+ 1
- 2
src/System.cpp Zobrazit soubor

@@ -517,9 +517,8 @@ void System::initGL()
517 517
 {
518 518
 	char *s;
519 519
 
520
-
521 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 522
 	printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
524 523
 	printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
525 524
 	printf("\tVersion    : %s\n", glGetString(GL_VERSION));

Loading…
Zrušit
Uložit