]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
added RENDERPATH_GLES2
[xonotic/darkplaces.git] / vid_sdl.c
index 05e478d9454dbed37a06a335411830e5e335ecf3..3394cb5a77c5fb96f10d45654e3bb4ccdccfe37f 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -68,6 +68,7 @@ qboolean vid_supportrefreshrate = false;
 
 cvar_t vid_soft = {CVAR_SAVE, "vid_soft", "0", "enables use of the DarkPlaces Software Rasterizer rather than OpenGL or Direct3D"};
 cvar_t vid_soft_threads = {CVAR_SAVE, "vid_soft_threads", "2", "the number of threads the DarkPlaces Software Rasterizer should use"}; 
+cvar_t vid_soft_interlace = {CVAR_SAVE, "vid_soft_interlace", "1", "whether the DarkPlaces Software Rasterizer shoud interlace the screen bands occupied by each thread"};
 cvar_t joy_detected = {CVAR_READONLY, "joy_detected", "0", "number of joysticks detected by engine"};
 cvar_t joy_enable = {CVAR_SAVE, "joy_enable", "0", "enables joystick support"};
 cvar_t joy_index = {0, "joy_index", "0", "selects which joystick to use if you have multiple"};
@@ -1107,7 +1108,7 @@ void GLES_Init(void)
        vid.teximageunits = bound(1, vid.teximageunits, MAX_TEXTUREUNITS);
        vid.texarrayunits = bound(1, vid.texarrayunits, MAX_TEXTUREUNITS);
        Con_DPrintf("Using GLES2.0 rendering path - %i texture matrix, %i texture images, %i texcoords%s\n", vid.texunits, vid.teximageunits, vid.texarrayunits, vid.support.ext_framebuffer_object ? ", shadowmapping supported" : "");
-       vid.renderpath = RENDERPATH_GL20;
+       vid.renderpath = RENDERPATH_GLES2;
        vid.useinterleavedarrays = false;
 
        // VorteX: set other info (maybe place them in VID_InitMode?)
@@ -1145,6 +1146,7 @@ void VID_Init (void)
 #endif
        Cvar_RegisterVariable(&vid_soft);
        Cvar_RegisterVariable(&vid_soft_threads);
+       Cvar_RegisterVariable(&vid_soft_interlace);
        Cvar_RegisterVariable(&joy_detected);
        Cvar_RegisterVariable(&joy_enable);
        Cvar_RegisterVariable(&joy_index);
@@ -1660,7 +1662,7 @@ qboolean VID_InitModeSoft(viddef_mode_t *mode)
 
        vid.softpixels = (unsigned int *)vid_softsurface->pixels;
        vid.softdepthpixels = (unsigned int *)calloc(1, mode->width * mode->height * 4);
-       DPSOFTRAST_Init(mode->width, mode->height, vid_soft_threads.integer, (unsigned int *)vid_softsurface->pixels, (unsigned int *)vid.softdepthpixels);
+       DPSOFTRAST_Init(mode->width, mode->height, vid_soft_threads.integer, vid_soft_interlace.integer, (unsigned int *)vid_softsurface->pixels, (unsigned int *)vid.softdepthpixels);
 
        // set window title
        VID_SetCaption();
@@ -1829,6 +1831,7 @@ void VID_Finish (void)
                case RENDERPATH_GL13:
                case RENDERPATH_GL20:
                case RENDERPATH_CGGL:
+               case RENDERPATH_GLES2:
                        CHECKGLERROR
                        if (r_speeds.integer == 2 || gl_finish.integer)
                        {