SDL: fix 0.153 regression where user GLSL shaders didn't work. [R. Belmont]

This commit is contained in:
R. Belmont 2014-06-11 02:45:49 +00:00
parent b904874e51
commit b33377d0b1

View File

@ -1619,6 +1619,16 @@ static void texture_compute_type_subroutine(sdl_info *sdl, const render_texinfo
texture->texpow2 = (sdl->usetexturerect)?0:sdl->texpoweroftwo; texture->texpow2 = (sdl->usetexturerect)?0:sdl->texpoweroftwo;
} }
if ( texture->type == TEXTURE_TYPE_NONE && sdl->useglsl &&
texture->xprescale == 1 && texture->yprescale == 1 &&
texsource->rowpixels <= sdl->texture_max_width )
{
texture->type = TEXTURE_TYPE_SHADER;
texture->nocopy = TRUE;
texture->texTarget = GL_TEXTURE_2D;
texture->texpow2 = sdl->texpoweroftwo;
}
// determine if we can skip the copy step // determine if we can skip the copy step
// if this was not already decided by the shader condition above // if this was not already decided by the shader condition above
if ( texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_EQUALS_DEST] && if ( texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_EQUALS_DEST] &&