From: havoc Date: Tue, 22 May 2018 01:43:35 +0000 (+0000) Subject: Rename RENDERPATH_GL20 to RENDERPATH_GL32. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e4c97e31349324e4fc483d61da289284c28c6bab;p=xonotic%2Fdarkplaces.git Rename RENDERPATH_GL20 to RENDERPATH_GL32. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12432 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_backend.c b/gl_backend.c index a9751336..691f6eeb 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -318,7 +318,7 @@ static void gl_backend_start(void) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: // fetch current fbo here (default fbo is not 0 on some GLES devices) CHECKGLERROR @@ -333,7 +333,7 @@ static void gl_backend_shutdown(void) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: break; } @@ -356,7 +356,7 @@ static void gl_backend_devicelost(void) r_meshbuffer_t *buffer; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: break; } @@ -368,7 +368,7 @@ static void gl_backend_devicelost(void) continue; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: break; } @@ -379,7 +379,7 @@ static void gl_backend_devicerestored(void) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: break; } @@ -447,7 +447,7 @@ void GL_Finish(void) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglFinish();CHECKGLERROR @@ -587,7 +587,7 @@ qboolean R_ScissorForBBox(const float *mins, const float *maxs, int *scissor) // D3D Y coordinate is top to bottom, OpenGL is bottom to top, fix the D3D one switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: break; } @@ -654,7 +654,7 @@ void R_Viewport_InitOrtho(r_viewport_t *v, const matrix4x4_t *cameramatrix, int m[15] = 1; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: break; } @@ -954,7 +954,7 @@ void R_SetViewport(const r_viewport_t *v) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglViewport(v->x, v->y, v->width, v->height);CHECKGLERROR @@ -1010,7 +1010,7 @@ int R_Mesh_CreateFramebufferObject(rtexture_t *depthtexture, rtexture_t *colorte GLuint status; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglGenFramebuffers(1, (GLuint*)&temp);CHECKGLERROR @@ -1085,7 +1085,7 @@ void R_Mesh_DestroyFramebufferObject(int fbo) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (fbo) { @@ -1114,7 +1114,7 @@ void R_Mesh_SetRenderTargets(int fbo, rtexture_t *depthtexture, rtexture_t *colo // set up framebuffer object or render targets for the active rendering API switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (gl_state.framebufferobject != fbo) { @@ -1151,7 +1151,7 @@ static void GL_Backend_ResetState(void) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglColorMask(1, 1, 1, 1);CHECKGLERROR @@ -1195,7 +1195,7 @@ void GL_ActiveTexture(unsigned int num) gl_state.unit = num; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglActiveTexture(GL_TEXTURE0 + gl_state.unit);CHECKGLERROR @@ -1214,7 +1214,7 @@ void GL_BlendFunc(int blendfunc1, int blendfunc2) blendenable = (gl_state.blendfunc1 != GL_ONE || gl_state.blendfunc2 != GL_ZERO); switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if (qglBlendFuncSeparate) @@ -1249,7 +1249,7 @@ void GL_DepthMask(int state) gl_state.depthmask = state; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglDepthMask(gl_state.depthmask);CHECKGLERROR @@ -1265,7 +1265,7 @@ void GL_DepthTest(int state) gl_state.depthtest = state; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if (gl_state.depthtest) @@ -1288,7 +1288,7 @@ void GL_DepthFunc(int state) gl_state.depthfunc = state; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglDepthFunc(gl_state.depthfunc);CHECKGLERROR @@ -1305,7 +1305,7 @@ void GL_DepthRange(float nearfrac, float farfrac) gl_state.depthrange[1] = farfrac; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR #ifdef USE_GLES2 @@ -1322,7 +1322,7 @@ void R_SetStencil(qboolean enable, int writemask, int fail, int zfail, int zpass { switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if (enable) @@ -1349,7 +1349,7 @@ void GL_PolygonOffset(float planeoffset, float depthoffset) gl_state.polygonoffset[1] = depthoffset; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglPolygonOffset(gl_state.polygonoffset[0], gl_state.polygonoffset[1]);CHECKGLERROR @@ -1371,7 +1371,7 @@ void GL_SetMirrorState(qboolean state) return; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglCullFace(gl_state.cullface);CHECKGLERROR @@ -1392,7 +1392,7 @@ void GL_CullFace(int state) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR @@ -1430,7 +1430,7 @@ void GL_AlphaToCoverage(qboolean state) { case RENDERPATH_GLES2: break; - case RENDERPATH_GL20: + case RENDERPATH_GL32: #ifdef GL_SAMPLE_ALPHA_TO_COVERAGE_ARB // alpha to coverage turns the alpha value of the pixel into 0%, 25%, 50%, 75% or 100% by masking the multisample fragments accordingly CHECKGLERROR @@ -1459,7 +1459,7 @@ void GL_ColorMask(int r, int g, int b, int a) gl_state.colormask = state; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglColorMask((GLboolean)r, (GLboolean)g, (GLboolean)b, (GLboolean)a);CHECKGLERROR @@ -1478,7 +1478,7 @@ void GL_Color(float cr, float cg, float cb, float ca) gl_state.color4f[3] = ca; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: qglVertexAttrib4f(GLSLATTRIB_COLOR, cr, cg, cb, ca);CHECKGLERROR break; @@ -1490,7 +1490,7 @@ void GL_Scissor (int x, int y, int width, int height) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglScissor(x, y,width,height);CHECKGLERROR @@ -1505,7 +1505,7 @@ void GL_ScissorTest(int state) gl_state.scissortest = state; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if(gl_state.scissortest) @@ -1532,7 +1532,7 @@ void GL_Clear(int mask, const float *colorvalue, float depthvalue, int stencilva } switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if (mask & GL_COLOR_BUFFER_BIT) @@ -1560,7 +1560,7 @@ void GL_ReadPixelsBGRA(int x, int y, int width, int height, unsigned char *outpi { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR #ifndef GL_BGRA @@ -1778,7 +1778,7 @@ void R_Mesh_Draw(int firstvertex, int numvertices, int firsttriangle, int numtri { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if (bufferobject3s) @@ -1841,7 +1841,7 @@ void R_Mesh_UpdateMeshBuffer(r_meshbuffer_t *buffer, const void *data, size_t si buffer->size = size; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (!buffer->bufferobject) qglGenBuffers(1, (GLuint *)&buffer->bufferobject); @@ -1879,7 +1879,7 @@ void R_Mesh_DestroyMeshBuffer(r_meshbuffer_t *buffer) return; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: // GL clears the binding if we delete something bound if (gl_state.uniformbufferobject == buffer->bufferobject) @@ -1948,7 +1948,7 @@ void R_Mesh_VertexPointer(int components, int gltype, size_t stride, const void { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (gl_state.pointer_vertex_components != components || gl_state.pointer_vertex_gltype != gltype || gl_state.pointer_vertex_stride != stride || gl_state.pointer_vertex_pointer != pointer || gl_state.pointer_vertex_vertexbuffer != vertexbuffer || gl_state.pointer_vertex_offset != bufferoffset) { @@ -1976,7 +1976,7 @@ void R_Mesh_ColorPointer(int components, int gltype, size_t stride, const void * // the pointer only. switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if (pointer) @@ -2027,7 +2027,7 @@ void R_Mesh_TexCoordPointer(unsigned int unitnum, int components, int gltype, si // that involve a valid bufferobject also supply a texcoord array switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if (pointer) @@ -2084,7 +2084,7 @@ void R_Mesh_CopyToTexture(rtexture_t *tex, int tx, int ty, int sx, int sy, int w { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: R_Mesh_TexBind(0, tex); GL_ActiveTexture(0);CHECKGLERROR @@ -2120,7 +2120,7 @@ void R_Mesh_TexBind(unsigned int unitnum, rtexture_t *tex) return; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (!tex) { @@ -2251,7 +2251,7 @@ void GL_BlendEquationSubtract(qboolean negated) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: qglBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT);CHECKGLERROR break; @@ -2261,7 +2261,7 @@ void GL_BlendEquationSubtract(qboolean negated) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: qglBlendEquationEXT(GL_FUNC_ADD);CHECKGLERROR break; diff --git a/gl_draw.c b/gl_draw.c index c7e69946..0e48d651 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -1442,7 +1442,7 @@ void DrawQ_SetClipArea(float x, float y, float width, float height) ih = (int)(0.5 + height * ((float)r_refdef.view.height / vid_conheight.integer)); switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: GL_Scissor(ix, vid.height - iy - ih, iw, ih); break; diff --git a/gl_rmain.c b/gl_rmain.c index 5afef1c4..9edd9c0d 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -1407,7 +1407,7 @@ void R_GLSL_Restart_f(void) unsigned int i, limit; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: { r_glsl_permutation_t *p; @@ -1484,7 +1484,7 @@ void R_SetupShader_Generic(rtexture_t *t, qboolean usegamma, qboolean notrippy, GL_AlphaToCoverage(false); switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: R_SetupShader_SetPermutationGLSL(SHADERMODE_GENERIC, permutation); if (r_glsl_permutation->tex_Texture_First >= 0) @@ -1514,7 +1514,7 @@ void R_SetupShader_DepthOrShadow(qboolean notrippy, qboolean depthrgb, qboolean GL_AlphaToCoverage(false); switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: R_SetupShader_SetPermutationGLSL(SHADERMODE_DEPTH_OR_SHADOW, permutation); #ifndef USE_GLES2 /* FIXME: GLES3 only */ @@ -1860,7 +1860,7 @@ void R_SetupShader_Surface(const float rtlightambient[3], const float rtlightdif permutation |= SHADERPERMUTATION_FOGALPHAHACK; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | BATCHNEED_ARRAY_NORMAL | BATCHNEED_ARRAY_VECTOR | (rsurface.modellightmapcolor4f ? BATCHNEED_ARRAY_VERTEXCOLOR : 0) | BATCHNEED_ARRAY_TEXCOORD | (rsurface.uselightmaptexture ? BATCHNEED_ARRAY_LIGHTMAP : 0) | BATCHNEED_ALLOWMULTIDRAW, texturenumsurfaces, texturesurfacelist); R_Mesh_VertexPointer( 3, GL_FLOAT, sizeof(float[3]), rsurface.batchvertex3f, rsurface.batchvertex3f_vertexbuffer, rsurface.batchvertex3f_bufferoffset); @@ -2076,7 +2076,7 @@ void R_SetupShader_DeferredLight(const rtlight_t *rtlight) Matrix4x4_ToArrayFloatGL(&viewtolight, viewtolight16f); switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: R_SetupShader_SetPermutationGLSL(mode, permutation); if (r_glsl_permutation->loc_LightPosition >= 0) qglUniform3f( r_glsl_permutation->loc_LightPosition , viewlightorigin[0], viewlightorigin[1], viewlightorigin[2]); @@ -3032,7 +3032,7 @@ static void gl_main_start(void) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: Cvar_SetValueQuick(&r_textureunits, vid.texunits); Cvar_SetValueQuick(&gl_combine, 1); @@ -3120,7 +3120,7 @@ static void gl_main_shutdown(void) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: #if defined(GL_SAMPLES_PASSED_ARB) && !defined(USE_GLES2) if (r_maxqueries) @@ -4510,7 +4510,7 @@ void R_EntityMatrix(const matrix4x4_t *matrix) CHECKGLERROR switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (r_glsl_permutation && r_glsl_permutation->loc_ModelViewProjectionMatrix >= 0) qglUniformMatrix4fv(r_glsl_permutation->loc_ModelViewProjectionMatrix, 1, false, gl_modelviewprojection16f); if (r_glsl_permutation && r_glsl_permutation->loc_ModelViewMatrix >= 0) qglUniformMatrix4fv(r_glsl_permutation->loc_ModelViewMatrix, 1, false, gl_modelview16f); @@ -4543,7 +4543,7 @@ void R_ResetViewRendering2D_Common(int viewfbo, rtexture_t *viewdepthtexture, rt GL_PolygonOffset(0, 0); switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: qglEnable(GL_POLYGON_OFFSET_FILL);CHECKGLERROR break; @@ -4575,7 +4575,7 @@ void R_ResetViewRendering3D(int viewfbo, rtexture_t *viewdepthtexture, rtexture_ GL_PolygonOffset(r_refdef.polygonfactor, r_refdef.polygonoffset); switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: qglEnable(GL_POLYGON_OFFSET_FILL);CHECKGLERROR break; @@ -5114,7 +5114,7 @@ static void R_Bloom_StartFrame(void) switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: r_fb.usedepthtextures = r_usedepthtextures.integer != 0; if (r_viewfbo.integer == 2) textype = TEXTYPE_COLORBUFFER16F; if (r_viewfbo.integer == 3) textype = TEXTYPE_COLORBUFFER32F; @@ -5419,7 +5419,7 @@ static void R_BlendView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *v R_Mesh_PrepareVertices_Mesh_Arrays(4, r_screenvertex3f, NULL, NULL, NULL, NULL, r_fb.rt_screen->texcoord2f, bloomtexture ? r_fb.rt_bloom->texcoord2f : NULL); switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: permutation = (r_fb.bloomwidth ? SHADERPERMUTATION_BLOOM : 0) @@ -5576,7 +5576,7 @@ void R_UpdateVariables(void) r_gpuskeletal = false; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: r_gpuskeletal = r_glsl_skeletal.integer && !r_showsurfaces.integer; case RENDERPATH_GLES2: if(!vid_gammatables_trivial) @@ -8897,7 +8897,7 @@ static void R_DrawModelTextureSurfaceList(int texturenumsurfaces, const msurface } switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: R_DrawTextureSurfaceList_GL20(texturenumsurfaces, texturesurfacelist, writedepth, prepass); break; diff --git a/gl_textures.c b/gl_textures.c index 80fd30ae..f2820680 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -351,7 +351,7 @@ void R_FreeTexture(rtexture_t *rt) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (glt->texnum) { @@ -461,7 +461,7 @@ static void GL_TextureMode_f (void) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: // change all the existing mipmap texture objects // FIXME: force renderer(/client/something?) restart instead? @@ -620,7 +620,7 @@ static void r_textures_start(void) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: // LordHavoc: allow any alignment CHECKGLERROR @@ -675,7 +675,7 @@ static void r_textures_devicelost(void) continue; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: break; } @@ -694,7 +694,7 @@ static void r_textures_devicerestored(void) continue; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: break; } @@ -772,7 +772,7 @@ void R_Textures_Frame (void) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: // ignore the first difference, any textures loaded by now probably had the same aniso value if (first_time_aniso) @@ -934,7 +934,7 @@ static void R_UploadPartialTexture(gltexture_t *glt, const unsigned char *data, switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: { int oldbindtexnum; @@ -1020,7 +1020,7 @@ static void R_UploadFullTexture(gltexture_t *glt, const unsigned char *data) // do the appropriate upload type... switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (glt->texnum) // not renderbuffers { @@ -1316,7 +1316,7 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden // data may be NULL (blank texture for dynamic rendering) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglGenTextures(1, (GLuint *)&glt->texnum);CHECKGLERROR @@ -1403,7 +1403,7 @@ rtexture_t *R_LoadTextureRenderBuffer(rtexturepool_t *rtexturepool, const char * // data may be NULL (blank texture for dynamic rendering) switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR qglGenRenderbuffers(1, (GLuint *)&glt->renderbuffernum);CHECKGLERROR @@ -2181,7 +2181,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen // create the texture object switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR GL_ActiveTexture(0); @@ -2205,7 +2205,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen break; switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: if (bytesperblock) { @@ -2234,7 +2234,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen // after upload we have to set some parameters... switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: #ifdef GL_TEXTURE_MAX_LEVEL if (dds_miplevels >= 1 && !mipcomplete) diff --git a/r_shadow.c b/r_shadow.c index 71bb892b..b26d9e9d 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -301,7 +301,7 @@ static void R_Shadow_SetShadowMode(void) r_shadow_shadowmapborder = bound(1, r_shadow_shadowmapping_bordersize.integer, 16); r_shadow_shadowmaptexturesize = bound(256, r_shadow_shadowmapping_texturesize.integer, (int)vid.maxtexturesize_2d); r_shadow_shadowmapmaxsize = bound(r_shadow_shadowmapborder+2, r_shadow_shadowmapping_maxsize.integer, r_shadow_shadowmaptexturesize / 8); - r_shadow_shadowmapvsdct = r_shadow_shadowmapping_vsdct.integer != 0 && vid.renderpath == RENDERPATH_GL20; + r_shadow_shadowmapvsdct = r_shadow_shadowmapping_vsdct.integer != 0 && vid.renderpath == RENDERPATH_GL32; r_shadow_shadowmapfilterquality = r_shadow_shadowmapping_filterquality.integer; r_shadow_shadowmapshadowsampler = r_shadow_shadowmapping_useshadowsampler.integer != 0; r_shadow_shadowmapdepthbits = r_shadow_shadowmapping_depthbits.integer; @@ -314,7 +314,7 @@ static void R_Shadow_SetShadowMode(void) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: if(r_shadow_shadowmapfilterquality < 0) { if (!r_fb.usedepthtextures) @@ -459,7 +459,7 @@ static void r_shadow_start(void) // these out per frame... switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: r_shadow_bouncegrid_state.allowdirectionalshading = true; r_shadow_bouncegrid_state.capable = true; break; @@ -1496,7 +1496,7 @@ void R_Shadow_ClearShadowMapTexture(void) GL_ColorMask(0, 0, 0, 0); switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: GL_CullFace(r_refdef.view.cullface_back); break; @@ -1571,7 +1571,7 @@ static void R_Shadow_RenderMode_ShadowMap(int side, int size, int x, int y) GL_ColorMask(0,0,0,0); switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: GL_CullFace(r_refdef.view.cullface_back); break; @@ -4047,7 +4047,7 @@ void R_Shadow_PrepareLights(void) if (r_shadow_shadowmaptexturesize != shadowmaptexturesize || !(r_shadow_shadowmapping.integer || r_shadow_deferred.integer) || - r_shadow_shadowmapvsdct != (r_shadow_shadowmapping_vsdct.integer != 0 && vid.renderpath == RENDERPATH_GL20) || + r_shadow_shadowmapvsdct != (r_shadow_shadowmapping_vsdct.integer != 0 && vid.renderpath == RENDERPATH_GL32) || r_shadow_shadowmapfilterquality != r_shadow_shadowmapping_filterquality.integer || r_shadow_shadowmapshadowsampler != r_shadow_shadowmapping_useshadowsampler.integer || r_shadow_shadowmapdepthbits != r_shadow_shadowmapping_depthbits.integer || @@ -4060,7 +4060,7 @@ void R_Shadow_PrepareLights(void) switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: #ifndef USE_GLES2 if (!r_shadow_deferred.integer || vid.maxdrawbuffers < 2) { @@ -4447,7 +4447,7 @@ static void R_BeginCoronaQuery(rtlight_t *rtlight, float scale, qboolean usequer switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: #if defined(GL_SAMPLES_PASSED_ARB) && !defined(USE_GLES2) CHECKGLERROR @@ -4485,7 +4485,7 @@ static void R_DrawCorona(rtlight_t *rtlight, float cscale, float scale) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: #if defined(GL_SAMPLES_PASSED_ARB) && !defined(USE_GLES2) // See if we can use the GPU-side method to prevent implicit sync @@ -4566,7 +4566,7 @@ void R_Shadow_DrawCoronas(void) r_numqueries = 0; switch (vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: usequery = vid.support.arb_occlusion_query && r_coronas_occlusionquery.integer; #if defined(GL_SAMPLES_PASSED_ARB) && !defined(USE_GLES2) diff --git a/vid.h b/vid.h index fa036e6e..c281f7dc 100644 --- a/vid.h +++ b/vid.h @@ -30,7 +30,7 @@ extern int cl_available; typedef enum renderpath_e { - RENDERPATH_GL20, + RENDERPATH_GL32, RENDERPATH_GLES2 } renderpath_t; diff --git a/vid_sdl.c b/vid_sdl.c index 0b6ce5ac..e7a32b12 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -2113,7 +2113,7 @@ void VID_Finish (void) { switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: case RENDERPATH_GLES2: CHECKGLERROR if (r_speeds.integer == 2 || gl_finish.integer) diff --git a/vid_shared.c b/vid_shared.c index a6912c04..39e0b396 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -767,7 +767,7 @@ void VID_ClearExtensions(void) // clear the extension flags memset(&vid.support, 0, sizeof(vid.support)); - vid.renderpath = RENDERPATH_GL20; + vid.renderpath = RENDERPATH_GL32; vid.sRGBcapable2D = false; vid.sRGBcapable3D = false; vid.maxtexturesize_2d = 0; @@ -875,8 +875,8 @@ void VID_CheckExtensions(void) vid.texunits = bound(4, vid.texunits, MAX_TEXTUREUNITS); vid.teximageunits = bound(16, vid.teximageunits, MAX_TEXTUREUNITS); vid.texarrayunits = bound(8, vid.texarrayunits, MAX_TEXTUREUNITS); - Con_DPrint("Using GL2+extensions rendering path\n"); - vid.renderpath = RENDERPATH_GL20; + Con_DPrint("Using GL3 rendering path\n"); + vid.renderpath = RENDERPATH_GL32; vid.sRGBcapable2D = false; vid.sRGBcapable3D = true; Con_DPrintf("vid.support.arb_multisample %i\n", vid.support.arb_multisample); @@ -1470,7 +1470,7 @@ static int VID_Mode(int fullscreen, int width, int height, int bpp, float refres switch(vid.renderpath) { - case RENDERPATH_GL20: + case RENDERPATH_GL32: #ifdef GL_STEREO { GLboolean stereo;