From: divverent Date: Sun, 22 Jan 2012 21:01:16 +0000 (+0000) Subject: WORKAROUND: turn off vid.support.ext_framebuffer_object if nonpoweroftwo is not suppo... X-Git-Tag: xonotic-v0.8.0~96^2~361 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=78e5e156b855ea7368fd3e821c76bedd42533f6f;p=xonotic%2Fdarkplaces.git WORKAROUND: turn off vid.support.ext_framebuffer_object if nonpoweroftwo is not supported because FBO rendering with non-npot is currently massively broken Please revert this commit when fixing the issue. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11652 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_sdl.c b/vid_sdl.c index 97433653..02435525 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -1572,6 +1572,14 @@ void GLES_Init(void) vid.support.ext_blend_subtract = true; vid.support.ext_draw_range_elements = true; vid.support.ext_framebuffer_object = false;//true; + + // FIXME remove this workaround once FBO + npot texture mapping is fixed + if(!vid.support.arb_texture_non_power_of_two) + { + vid.support.arb_framebuffer_object = false; + vid.support.ext_framebuffer_object = false; + } + vid.support.ext_packed_depth_stencil = false; vid.support.ext_stencil_two_side = false; vid.support.ext_texture_3d = SDL_GL_ExtensionSupported("GL_OES_texture_3D"); diff --git a/vid_shared.c b/vid_shared.c index 0859617f..cee0ebaf 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -1038,6 +1038,14 @@ void VID_CheckExtensions(void) vid.support.ext_framebuffer_object = true; else vid.support.ext_framebuffer_object = GL_CheckExtension("GL_EXT_framebuffer_object", extfbofuncs, "-nofbo", false); + + // FIXME remove this workaround once FBO + npot texture mapping is fixed + if(!vid.support.arb_texture_non_power_of_two) + { + vid.support.arb_framebuffer_object = false; + vid.support.ext_framebuffer_object = false; + } + vid.support.ext_packed_depth_stencil = GL_CheckExtension("GL_EXT_packed_depth_stencil", NULL, "-nopackeddepthstencil", false); vid.support.ext_stencil_two_side = GL_CheckExtension("GL_EXT_stencil_two_side", stenciltwosidefuncs, "-nostenciltwoside", false); vid.support.ext_texture_3d = GL_CheckExtension("GL_EXT_texture3D", texture3dextfuncs, "-notexture3d", false); @@ -2042,6 +2050,14 @@ void VID_Soft_SharedSetup(void) vid.support.ext_blend_subtract = true; vid.support.ext_draw_range_elements = true; vid.support.ext_framebuffer_object = true; + + // FIXME remove this workaround once FBO + npot texture mapping is fixed + if(!vid.support.arb_texture_non_power_of_two) + { + vid.support.arb_framebuffer_object = false; + vid.support.ext_framebuffer_object = false; + } + vid.support.ext_texture_3d = true; //vid.support.ext_texture_compression_s3tc = true; vid.support.ext_texture_filter_anisotropic = true; diff --git a/vid_wgl.c b/vid_wgl.c index 3f7d177d..cb74dea9 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -1508,6 +1508,14 @@ qboolean VID_InitModeDX(viddef_mode_t *mode, int version) vid.support.ext_blend_subtract = true; vid.support.ext_draw_range_elements = true; vid.support.ext_framebuffer_object = true; + + // FIXME remove this workaround once FBO + npot texture mapping is fixed + if(!vid.support.arb_texture_non_power_of_two) + { + vid.support.arb_framebuffer_object = false; + vid.support.ext_framebuffer_object = false; + } + vid.support.ext_texture_3d = true; vid.support.ext_texture_compression_s3tc = true; vid.support.ext_texture_filter_anisotropic = true;