소스 검색

Removed duplicated GL init code

Thomas Buck 10 년 전
부모
커밋
0beb9bbdea
6개의 변경된 파일3개의 추가작업 그리고 117개의 파일을 삭제
  1. 3
    0
      ChangeLog
  2. 0
    2
      include/OpenRaider.h
  3. 0
    2
      include/System.h
  4. 0
    6
      src/OpenRaider.cpp
  5. 0
    3
      src/SDLSystem.cpp
  6. 0
    104
      src/System.cpp

+ 3
- 0
ChangeLog 파일 보기

@@ -5,6 +5,9 @@
5 5
 
6 6
  OpenRaider (0.1.2) xythobuz <xythobuz@xythobuz.de>
7 7
 
8
+	[ 20140307 ]
9
+	* Removed duplicated GL initialization code
10
+
8 11
 	[ 20140306 ]
9 12
 	* Created utility library
10 13
 	* Rewrote bufferString()

+ 0
- 2
include/OpenRaider.h 파일 보기

@@ -121,8 +121,6 @@ public:
121 121
      */
122 122
     void handleKeyReleaseEvent(unsigned int key, unsigned int mod);
123 123
 
124
-    void initGL();
125
-
126 124
     /*!
127 125
      * \brief Pass a time frame and render a new frame
128 126
      */

+ 0
- 2
include/System.h 파일 보기

@@ -135,8 +135,6 @@ public:
135 135
 
136 136
     virtual void handleKeyReleaseEvent(unsigned int key, unsigned int mod) = 0;
137 137
 
138
-    virtual void initGL();
139
-
140 138
     virtual void initVideo(unsigned int width, unsigned int height, bool fullscreen) = 0;
141 139
 
142 140
     /*!

+ 0
- 6
src/OpenRaider.cpp 파일 보기

@@ -861,12 +861,6 @@ void OpenRaider::print(bool dump_stdout, const char *format, ...)
861 861
 }
862 862
 
863 863
 
864
-void OpenRaider::initGL()
865
-{
866
-    // Mongoose 2002.08.13, Handled in start() actually
867
-}
868
-
869
-
870 864
 void OpenRaider::start()
871 865
 {
872 866
     vec3_t up;

+ 0
- 3
src/SDLSystem.cpp 파일 보기

@@ -96,9 +96,6 @@ void SDLSystem::initVideo(unsigned int width, unsigned int height, bool fullscre
96 96
             width, height, flags);
97 97
     mGLContext = SDL_GL_CreateContext(mWindow);
98 98
 
99
-    // Start game renderer
100
-    initGL();
101
-
102 99
     // Resize context
103 100
     resizeGL(width, height);
104 101
 }

+ 0
- 104
src/System.cpp 파일 보기

@@ -269,110 +269,6 @@ void System::resetTicks()
269 269
 }
270 270
 
271 271
 
272
-void System::initGL()
273
-{
274
-    char *s;
275
-
276
-    // Print driver support information
277
-    printf("\n\n\t## GL Driver Info 1 ##\n");
278
-    printf("\tVendor     : %s\n", glGetString(GL_VENDOR));
279
-    printf("\tRenderer   : %s\n", glGetString(GL_RENDERER));
280
-    printf("\tVersion    : %s\n", glGetString(GL_VERSION));
281
-    printf("\tExtensions : %s\n\n\n", (char*)glGetString(GL_EXTENSIONS));
282
-
283
-    // Testing for goodies
284
-    // Mongoose 2001.12.31, Fixed string use to check for bad strings
285
-    s = (char*)glGetString(GL_EXTENSIONS);
286
-
287
-    if (s && s[0])
288
-    {
289
-        printf("\tGL_ARB_multitexture       \t\t");
290
-
291
-        if (strstr(s, "GL_ARB_multitexture"))
292
-        {
293
-            printf("YES\n");
294
-        }
295
-        else
296
-        {
297
-            printf("NO\n");
298
-        }
299
-
300
-        //glActiveTextureARB
301
-        //glMultiTexCoord2fARB
302
-        //glFogCoordfEXT
303
-
304
-        printf("\tGL_EXT_texture_env_combine\t\t");
305
-
306
-        if (strstr(s, "GL_EXT_texture_env_combine"))
307
-        {
308
-            printf("YES\n");
309
-        }
310
-        else
311
-        {
312
-            printf("NO\n");
313
-        }
314
-    }
315
-
316
-    // Set up Z buffer
317
-    glEnable(GL_DEPTH_TEST);
318
-    glDepthFunc(GL_LESS);
319
-
320
-    // Set up culling
321
-    glEnable(GL_CULL_FACE);
322
-    //glFrontFace(GL_CW);
323
-    glFrontFace(GL_CCW);
324
-    //glCullFace(GL_FRONT);
325
-
326
-    // Set background to black
327
-    glClearColor(0.0, 0.0, 0.0, 1.0);
328
-
329
-    // Disable lighting
330
-    glDisable(GL_LIGHTING);
331
-
332
-    // Set up alpha blending
333
-    glEnable(GL_BLEND);
334
-    glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
335
-
336
-    //glEnable(GL_ALPHA_TEST); // Disable per pixel alpha blending
337
-    glAlphaFunc(GL_GREATER, 0);
338
-
339
-    glPointSize(5.0);
340
-
341
-    // Setup shading
342
-    glShadeModel(GL_SMOOTH);
343
-
344
-    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
345
-    glHint(GL_FOG_HINT, GL_NICEST);
346
-    glEnable(GL_COLOR_MATERIAL);
347
-    glEnable(GL_DITHER);
348
-
349
-    // AA polygon edges
350
-    glEnable(GL_POLYGON_SMOOTH);
351
-    glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
352
-
353
-    glEnable(GL_POINT_SMOOTH);
354
-    glEnable(GL_FOG);
355
-
356
-    glDisable(GL_LINE_SMOOTH);
357
-    glDisable(GL_AUTO_NORMAL);
358
-    glDisable(GL_LOGIC_OP);
359
-    glDisable(GL_TEXTURE_1D);
360
-    glDisable(GL_STENCIL_TEST);
361
-
362
-
363
-    glDisable(GL_NORMALIZE);
364
-
365
-    glEnableClientState(GL_VERTEX_ARRAY);
366
-    glDisableClientState(GL_EDGE_FLAG_ARRAY);
367
-    glDisableClientState(GL_COLOR_ARRAY);
368
-    glDisableClientState(GL_NORMAL_ARRAY);
369
-
370
-    glPolygonMode(GL_FRONT, GL_FILL);
371
-
372
-    glMatrixMode(GL_MODELVIEW);
373
-}
374
-
375
-
376 272
 void System::resizeGL(unsigned int w, unsigned int h)
377 273
 {
378 274
     if (!w || !h)

Loading…
취소
저장