Commit 531ec226 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Allow filtering on RECT textures.

There is no reason to disable linear filtering, we just cannot use mipmapping.
parent 52d28655
......@@ -185,6 +185,14 @@ const struct min_lookup minMipLookup_noFilter[] =
{{GL_NEAREST, GL_NEAREST, GL_NEAREST}}, /* LINEAR */
};
const struct min_lookup minMipLookup_noMip[] =
{
/* NONE POINT LINEAR */
{{GL_NEAREST, GL_NEAREST, GL_NEAREST}}, /* NONE */
{{GL_NEAREST, GL_NEAREST, GL_NEAREST}}, /* POINT */
{{GL_LINEAR, GL_LINEAR, GL_LINEAR }}, /* LINEAR */
};
const GLenum magLookup[] =
{
/* NONE POINT LINEAR */
......
......@@ -223,7 +223,15 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
texture->baseTexture.pow2Matrix[15] = 1.0f;
texture->target = GL_TEXTURE_RECTANGLE_ARB;
texture->cond_np2 = TRUE;
texture->baseTexture.minMipLookup = minMipLookup_noFilter;
if(texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
{
texture->baseTexture.minMipLookup = minMipLookup_noMip;
}
else
{
texture->baseTexture.minMipLookup = minMipLookup_noFilter;
}
}
else
{
......
......@@ -178,6 +178,7 @@ struct min_lookup
const struct min_lookup minMipLookup[WINED3DTEXF_LINEAR + 1];
const struct min_lookup minMipLookup_noFilter[WINED3DTEXF_LINEAR + 1];
const struct min_lookup minMipLookup_noMip[WINED3DTEXF_LINEAR + 1];
const GLenum magLookup[WINED3DTEXF_LINEAR + 1];
const GLenum magLookup_noFilter[WINED3DTEXF_LINEAR + 1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment