]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
WORKAROUND: turn off vid.support.ext_framebuffer_object if nonpoweroftwo is not suppo...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 22 Jan 2012 21:01:16 +0000 (21:01 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 22 Jan 2012 21:03:43 +0000 (22:03 +0100)
Please revert this commit when fixing the issue.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11652 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=78e5e156b855ea7368fd3e821c76bedd42533f6f

vid_sdl.c
vid_shared.c
vid_wgl.c

index 97433653fdeb9bfc8409aa6a2f4d1e951ed3c443..024355253bf92d6ce5479659c9cb303b60919154 100644 (file)
--- 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");
index 0859617f5f906c45e51aa189785376f40785f298..cee0ebaf67d73484955c332c8901054c149c99ae 100644 (file)
@@ -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;
index 3f7d177dcd1aac21a30ed04e519bd986c5f01a63..cb74dea9357b714510a3a5a70c2f372b09e28fcb 100644 (file)
--- 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;