ClearTextureFilters - what does it actually do?

Blitz3D Forums/Blitz3D Programming/ClearTextureFilters - what does it actually do?

IPete2(Posted 2005) [#1]
Hi,

I need one of my textures loading in the way that it does when cleartexturefilters is used. But I need all the other textures loaded without the effect it has on them.

Is this possible somehow?

Can anyone please help me with this?

Thanks,

IPete2.


Beaker(Posted 2005) [#2]
http://www.blitzbasic.com/b3ddocs/command.php?name=TextureFilter&ref=3d_cat


IPete2(Posted 2005) [#3]
Beaker - many thanks - I have actually read the docs about it and it didn't really answer my question, and searching the forum revealed a sort of answer but it didn't do what I wanted.

I needed just one texture to appear as though the 'cleartexturefilters' command had been used, and the rest as though it hadn't. I noticed John Blackledge had had a similar problem so I got hold of him on the phone. Here's what we came up with - it is a bit obvious but incase someone else needs this here it is.

You can use any texture which needs 'cleartexturefilters' inside Blitz by simply calling 'cleartexturefilters'in code. This will of course affect all the loaded textures from that point onwards.

Then using Giles, I set all the textures on the models/meshes with mip-mapping on, so we get a nice blurry effect. When loaded into B3d these settings appear to take prescedance over the 'cleartexturefilters' settings. So one texture has cleartexturefilters set on it all the rest (i.e. those loaded as part of the meshes) do not.

There you have it. Simple as I said. :)

I just need to make sure that all graphics cards react the same way I guess.

IPete2.


Beaker(Posted 2005) [#4]
You could of course use the TextureFilter command with a particularly named texture file (example: "Thing_noflags.jpg"). The example in the link I posted above does this.

Sorry I wasn't more help.


John Blackledge(Posted 2005) [#5]
Ah... credit at last.


Bouncer(Posted 2005) [#6]
You can put the defaults back after cleartexturefilters() by using texturefilter("",1+8).......
there you have it.


GfK(Posted 2005) [#7]
I've hit exactly the same problem with par fore. I now have a function that loads all my textures, something like this (which is pretty much what Bouncer said):
Function LoadTextures()
  ClearTextureFilters()
    ;load some textures
  TextureFilter "",1+8
    ;load some more textures
End Function



John Blackledge(Posted 2005) [#8]
Yes, but haven't you just set your program back to exactly where it was originally? And Pete would be back where he was at the start of the problem.

In a nutshell, what Pete needed was a way to say:
ClearTextureFilters - but only for _one_ texture.
The only way that this seems possible is to manually set the texture flag for that one texture explicitly and externally in something like Giles, which Blitz3D will acknowledge.


Beaker(Posted 2005) [#9]
.


IPete2(Posted 2005) [#10]
Thanks for ALL the feedback guys, it is very useful to discuss these things 'outloud'. Beaker you were a help!

As John said - I managed to set the properties in Giles for all but ONE of the textures, then in B3d I used cleartexturefilters to hit that texture only. :) The result is exactly what I wanted. It makes a very great difference to what I'm attempting to do.

GFKm thanks for the function - and useful info. :)

IPete2.