int i;
int waterwidth, waterheight, texturewidth, textureheight, camerawidth, cameraheight;
r_waterstate_waterplane_t *p;
- qboolean usewaterfbo = (r_viewfbo.integer >= 1 || r_water_fbo.integer >= 1) && vid.support.ext_framebuffer_object && vid.samples < 2;
+ qboolean usewaterfbo = (r_viewfbo.integer >= 1 || r_water_fbo.integer >= 1) && vid.support.ext_framebuffer_object && vid.support.arb_texture_non_power_of_two && vid.samples < 2;
if (vid.width > (int)vid.maxtexturesize_2d || vid.height > (int)vid.maxtexturesize_2d)
return;
int planeindex, qualityreduction = 0, old_r_dynamic = 0, old_r_shadows = 0, old_r_worldrtlight = 0, old_r_dlight = 0, old_r_particles = 0, old_r_decals = 0;
r_waterstate_waterplane_t *p;
vec3_t visorigin;
- qboolean usewaterfbo = (r_viewfbo.integer >= 1 || r_water_fbo.integer >= 1) && vid.support.ext_framebuffer_object && vid.samples < 2;
+ qboolean usewaterfbo = (r_viewfbo.integer >= 1 || r_water_fbo.integer >= 1) && vid.support.ext_framebuffer_object && vid.support.arb_texture_non_power_of_two && vid.samples < 2;
char vabuf[1024];
originalview = r_refdef.view;
int i;
int bloomtexturewidth, bloomtextureheight, screentexturewidth, screentextureheight;
int viewwidth, viewheight;
- qboolean useviewfbo = r_viewfbo.integer >= 1 && vid.support.ext_framebuffer_object && vid.samples < 2;
+ qboolean useviewfbo = r_viewfbo.integer >= 1 && vid.support.ext_framebuffer_object && vid.support.arb_texture_non_power_of_two && vid.samples < 2;
textype_t textype = TEXTYPE_COLORBUFFER;
switch (vid.renderpath)
{
case RENDERPATH_GL20:
r_fb.usedepthtextures = r_usedepthtextures.integer != 0;
- if (vid.support.ext_framebuffer_object)
+ if (vid.support.ext_framebuffer_object && vid.support.arb_texture_non_power_of_two)
{
if (r_viewfbo.integer == 2) textype = TEXTYPE_COLORBUFFER16F;
if (r_viewfbo.integer == 3) textype = TEXTYPE_COLORBUFFER32F;
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");
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);
(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.samples < 2))
+ !(r_viewfbo.integer >= 2 && vid.support.ext_framebuffer_object && vid.support.arb_texture_non_power_of_two && vid.samples < 2))
)
vid.sRGB2D = vid.sRGB3D = false;
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;
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;