X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=vid_shared.c;h=0c9ee5ed8d00b3ddae7d83077316e6ea8746d185;hp=7ee5b34f6d3d50fbef0dd0f6defe285d7a662787;hb=da42c657f8671a1d44463763607e64a00087af94;hpb=23fba558a074bc8f7b32f9dceae4a2eb96f1789a diff --git a/vid_shared.c b/vid_shared.c index 7ee5b34f..0c9ee5ed 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -195,8 +195,7 @@ cvar_t v_color_grey_b = {CVAR_SAVE, "v_color_grey_b", "0.5", "desired color of g cvar_t v_color_white_r = {CVAR_SAVE, "v_color_white_r", "1", "desired color of white"}; cvar_t v_color_white_g = {CVAR_SAVE, "v_color_white_g", "1", "desired color of white"}; cvar_t v_color_white_b = {CVAR_SAVE, "v_color_white_b", "1", "desired color of white"}; -cvar_t v_glslgamma = {CVAR_SAVE, "v_glslgamma", "1", "enables use of GLSL to apply gamma correction ramps"}; -cvar_t v_glslgamma_2d = {CVAR_SAVE, "v_glslgamma_2d", "0", "applies GLSL gamma to 2d pictures (HUD, fonts)"}; +cvar_t v_glslgamma_2d = {CVAR_SAVE, "v_glslgamma_2d", "1", "applies GLSL gamma to 2d pictures (HUD, fonts)"}; cvar_t v_psycho = {0, "v_psycho", "0", "easter egg - R.I.P. zinx http://obits.al.com/obituaries/birmingham/obituary.aspx?n=christopher-robert-lais&pid=186080667"}; // brand of graphics chip @@ -1060,10 +1059,7 @@ void VID_CheckExtensions(void) vid.support.arb_texture_cube_map = GL_CheckExtension("GL_ARB_texture_cube_map", NULL, "-nocubemap", false); vid.support.arb_texture_env_combine = GL_CheckExtension("GL_ARB_texture_env_combine", NULL, "-nocombine", false) || GL_CheckExtension("GL_EXT_texture_env_combine", NULL, "-nocombine", false); vid.support.arb_texture_gather = GL_CheckExtension("GL_ARB_texture_gather", NULL, "-notexturegather", false); -#ifndef __APPLE__ - // LordHavoc: too many bugs on OSX! vid.support.arb_texture_non_power_of_two = GL_CheckExtension("GL_ARB_texture_non_power_of_two", NULL, "-notexturenonpoweroftwo", false); -#endif vid.support.arb_vertex_buffer_object = GL_CheckExtension("GL_ARB_vertex_buffer_object", vbofuncs, "-novbo", false); vid.support.arb_uniform_buffer_object = GL_CheckExtension("GL_ARB_uniform_buffer_object", ubofuncs, "-noubo", false); vid.support.ati_separate_stencil = GL_CheckExtension("separatestencil", gl2separatestencilfuncs, "-noseparatestencil", true) || GL_CheckExtension("GL_ATI_separate_stencil", atiseparatestencilfuncs, "-noseparatestencil", false); @@ -1152,7 +1148,7 @@ void VID_CheckExtensions(void) vid.texunits = vid.teximageunits = vid.texarrayunits = 1; if (vid.support.arb_multitexture) qglGetIntegerv(GL_MAX_TEXTURE_UNITS, (GLint*)&vid.texunits); - if (vid_gl20.integer && vid.support.gl20shaders) + if (vid_gl20.integer && vid.support.gl20shaders && vid.support.ext_framebuffer_object && vid.support.arb_texture_non_power_of_two) { qglGetIntegerv(GL_MAX_TEXTURE_UNITS, (GLint*)&vid.texunits); qglGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, (int *)&vid.teximageunits);CHECKGLERROR @@ -1160,7 +1156,7 @@ 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_DPrintf("Using GL2.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" : ""); + Con_DPrintf("Using GL2.0+fbo 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.sRGBcapable2D = false; vid.sRGBcapable3D = true; @@ -1676,7 +1672,6 @@ void VID_Shared_Init(void) Cvar_RegisterVariable(&v_color_white_g); Cvar_RegisterVariable(&v_color_white_b); - Cvar_RegisterVariable(&v_glslgamma); Cvar_RegisterVariable(&v_glslgamma_2d); Cvar_RegisterVariable(&v_psycho); @@ -1818,7 +1813,7 @@ static int VID_Mode(int fullscreen, int width, int height, int bpp, float refres (vid_sRGB_fallback.integer >= 3) // force fallback || (vid_sRGB_fallback.integer >= 2 && // fallback if framebuffer is 8bit - !(r_viewfbo.integer >= 2 && vid.support.ext_framebuffer_object && vid.support.arb_texture_non_power_of_two && vid.samples < 2)) + r_viewfbo.integer < 2) ) vid.sRGB2D = vid.sRGB3D = false;