i have these lines just before glTexImage2D
and textures are filtered the same ugly way like GL_NEAREST do
both under win xp and 7
btw i program an image browser so textures are in fact images, that can be big
like 1920x1200
and performance also sucks.
i tried dx10 it handles hundred thumbnails with ease.
but with opengl i cant scroll the window with thumbs without stuttering.
LINEAR MIN filter means no mipmaps used, so it will be both slow and ugly when big images will be shown as a small thumbnail.
Try
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); for best quality (trilinear filtering), or GL_LINEAR_MIPMAP_NEAREST if your card is slow.
In either case, do not forget to either provide mipmap levels by hand to GL, or generate them with glGenerateMipmap();
i think i dont need mipmaps since i need only fixed size thumbnails.
1920x1200 is quite a thumbnail …
Can you post a screenshot ?
You can’t see a difference between nearest and linear filtering on a very reduced texture.
Both linear and nearest are also very slow in the MIN case, because texture access becomes very hard to cache (the whole 1920x1200 texture is sampled almost randomly). Nearest only have a performance advantage when used on MAG filtering.
maybe opengl has some restriction on appying trilinear filtering?
Say again ? By using MIN: LINEAR, you explicitely disabled trilinear filtering !
To get trilinear, use MIN: LINEAR MIPMAP LINEAR, and glGenerateMipmap(), it will be much better and faster.
MIN_MAG_MIP_LINEAR in dx10 gives smooth thumbnails
while GL_LINEAR doesnt work.
Did you even read what ZbuffeR said? Setting the min filter to GL_LINEAR is not the same thing as setting MIN_MAG_MIP_LINEAR in D3D. You have to set the min filter to GL_LINEAR_MIPMAP_LINEAR like he said.