Subversion Repositories eduke32

Rev

Rev 4992 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4992 Rev 4997
Line 1243... Line 1243...
1243
    bglEnable(GL_TEXTURE_2D);
1243
    bglEnable(GL_TEXTURE_2D);
1244
    bglShadeModel(GL_SMOOTH);  // GL_FLAT
1244
    bglShadeModel(GL_SMOOTH);  // GL_FLAT
1245
    bglClearColor(0, 0, 0, 0.5);  // Black Background
1245
    bglClearColor(0, 0, 0, 0.5);  // Black Background
1246
    bglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);  // Use FASTEST for ortho!
1246
    bglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);  // Use FASTEST for ortho!
1247
//    bglHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
1247
//    bglHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-
 
1248
-
 
1249
#ifndef EDUKE32_GLES
1248
    bglDisable(GL_DITHER);
1250
    bglDisable(GL_DITHER);
-
 
1251
#endif
1249
1252
1250
    glinfo.vendor = (const char *) bglGetString(GL_VENDOR);
1253
    glinfo.vendor = (const char *) bglGetString(GL_VENDOR);
1251
    glinfo.renderer = (const char *) bglGetString(GL_RENDERER);
1254
    glinfo.renderer = (const char *) bglGetString(GL_RENDERER);
1252
    glinfo.version = (const char *) bglGetString(GL_VERSION);
1255
    glinfo.version = (const char *) bglGetString(GL_VERSION);
1253
    glinfo.extensions = (const char *) bglGetString(GL_EXTENSIONS);
1256
    glinfo.extensions = (const char *) bglGetString(GL_EXTENSIONS);
Line 1286... Line 1289...
1286
    glinfo.clamptoedge = 1;
1289
    glinfo.clamptoedge = 1;
1287
    glinfo.multitex = 1;
1290
    glinfo.multitex = 1;
1288
1291
1289
    // process the extensions string and flag stuff we recognize
1292
    // process the extensions string and flag stuff we recognize
1290
1293
1291
    glinfo.bgra = !!Bstrstr(glinfo.extensions, "GL_EXT_bgra") || !!Bstrstr(glinfo.extensions, "GL_EXT_texture_format_BGRA8888");
-
 
1292
    glinfo.texcompr = !!Bstrstr(glinfo.extensions, "GL_ARB_texture_compression") && Bstrcmp(glinfo.vendor, "ATI Technologies Inc.");
1294
    glinfo.texcompr = !!Bstrstr(glinfo.extensions, "GL_ARB_texture_compression") && Bstrcmp(glinfo.vendor, "ATI Technologies Inc.");
1293
    glinfo.texnpot = !!Bstrstr(glinfo.extensions, "GL_ARB_texture_non_power_of_two") || !!Bstrstr(glinfo.extensions, "GL_OES_texture_npot");
1295
    glinfo.texnpot = !!Bstrstr(glinfo.extensions, "GL_ARB_texture_non_power_of_two") || !!Bstrstr(glinfo.extensions, "GL_OES_texture_npot");
1294
    glinfo.multisample = !!Bstrstr(glinfo.extensions, "GL_ARB_multisample");
1296
    glinfo.multisample = !!Bstrstr(glinfo.extensions, "GL_ARB_multisample");
1295
    glinfo.nvmultisamplehint = !!Bstrstr(glinfo.extensions, "GL_NV_multisample_filter_hint");
1297
    glinfo.nvmultisamplehint = !!Bstrstr(glinfo.extensions, "GL_NV_multisample_filter_hint");
1296
    glinfo.arbfp = !!Bstrstr(glinfo.extensions, "GL_ARB_fragment_program");
1298
    glinfo.arbfp = !!Bstrstr(glinfo.extensions, "GL_ARB_fragment_program");
1297
    glinfo.depthtex = !!Bstrstr(glinfo.extensions, "GL_ARB_depth_texture");
1299
    glinfo.depthtex = !!Bstrstr(glinfo.extensions, "GL_ARB_depth_texture");
1298
    glinfo.shadow = !!Bstrstr(glinfo.extensions, "GL_ARB_shadow");
1300
    glinfo.shadow = !!Bstrstr(glinfo.extensions, "GL_ARB_shadow");
1299
    glinfo.fbos = !!Bstrstr(glinfo.extensions, "GL_EXT_framebuffer_object") || !!Bstrstr(glinfo.extensions, "GL_OES_framebuffer_object");
1301
    glinfo.fbos = !!Bstrstr(glinfo.extensions, "GL_EXT_framebuffer_object") || !!Bstrstr(glinfo.extensions, "GL_OES_framebuffer_object");
1300
1302
1301
#ifndef __ANDROID__
1303
#ifndef __ANDROID__
-
 
1304
    glinfo.bgra = !!Bstrstr(glinfo.extensions, "GL_EXT_bgra");
1302
    glinfo.clamptoedge = !!Bstrstr(glinfo.extensions, "GL_EXT_texture_edge_clamp") ||
1305
    glinfo.clamptoedge = !!Bstrstr(glinfo.extensions, "GL_EXT_texture_edge_clamp") ||
1303
                         !!Bstrstr(glinfo.extensions, "GL_SGIS_texture_edge_clamp");
1306
                         !!Bstrstr(glinfo.extensions, "GL_SGIS_texture_edge_clamp");
1304
    glinfo.rect =
1307
    glinfo.rect =
1305
    !!Bstrstr(glinfo.extensions, "GL_NV_texture_rectangle") || !!Bstrstr(glinfo.extensions, "GL_EXT_texture_rectangle");
1308
    !!Bstrstr(glinfo.extensions, "GL_NV_texture_rectangle") || !!Bstrstr(glinfo.extensions, "GL_EXT_texture_rectangle");
1306
1309
Line 1436... Line 1439...
1436
    initprintf("Setting video mode %dx%d (%d-bpp %s)\n", x, y, c, ((fs & 1) ? "fullscreen" : "windowed"));
1439
    initprintf("Setting video mode %dx%d (%d-bpp %s)\n", x, y, c, ((fs & 1) ? "fullscreen" : "windowed"));
1437
1440
1438
#ifdef USE_OPENGL
1441
#ifdef USE_OPENGL
1439
    if (c > 8)
1442
    if (c > 8)
1440
    {
1443
    {
-
 
1444
        int32_t i, j;
-
 
1445
#ifndef EDUKE32_GLES
1441
        int32_t i, j, multisamplecheck = (glmultisample > 0);
1446
        int32_t multisamplecheck = (glmultisample > 0);
1442
1447
#else
-
 
1448
        int32_t multisamplecheck = 0;
-
 
1449
#endif
1443
        if (nogl)
1450
        if (nogl)
1444
            return -1;
1451
            return -1;
1445
1452
1446
#ifdef _WIN32
1453
#ifdef _WIN32
1447
        win_setvideomode(c);
1454
        win_setvideomode(c);
Line 1455... Line 1462...
1455
#ifdef EDUKE32_TOUCH_DEVICES
1462
#ifdef EDUKE32_TOUCH_DEVICES
1456
              { SDL_GL_CONTEXT_MAJOR_VERSION, 1 },
1463
              { SDL_GL_CONTEXT_MAJOR_VERSION, 1 },
1457
              { SDL_GL_CONTEXT_MINOR_VERSION, 1 },
1464
              { SDL_GL_CONTEXT_MINOR_VERSION, 1 },
1458
#endif
1465
#endif
1459
              { SDL_GL_DOUBLEBUFFER, 1 },
1466
              { SDL_GL_DOUBLEBUFFER, 1 },
-
 
1467
#ifndef EDUKE32_GLES
1460
              { SDL_GL_MULTISAMPLEBUFFERS, glmultisample > 0 },
1468
              { SDL_GL_MULTISAMPLEBUFFERS, glmultisample > 0 },
1461
              { SDL_GL_MULTISAMPLESAMPLES, glmultisample },
1469
              { SDL_GL_MULTISAMPLESAMPLES, glmultisample },
-
 
1470
#endif
1462
              { SDL_GL_STENCIL_SIZE, 1 },
1471
              { SDL_GL_STENCIL_SIZE, 1 },
1463
              { SDL_GL_ACCELERATED_VISUAL, 1 },
1472
              { SDL_GL_ACCELERATED_VISUAL, 1 },
1464
          };
1473
          };
1465
1474
1466
        do
1475
        do