|
From: James T. <ja...@co...> - 2003-10-13 20:35:19
|
>> - I also believe that it would be better to use GL_LINEAR for Image
>> Stretching not GL_NEAREST. Maybe u could put an extra parameter in the
>> function Resize/Stretch.
>>
>
In SDLGL_Util.cpp, I changed the lines
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
to
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
and noticed a visible difference. I'm not an OpenGL expert, so why
would anyone want to use GL_NEAREST?
From what I've seen I propose simply changing these lines and nothing
else but if I am going to bother leaving GL_NEAREST, instead of forcing the
change inside Resize/Stretch, would it not be best to simply have that
as an option defined for each ZImage, that way a minimal number of calls
to glTexParamteri would be required, and none would be required inside
the rendering loop in most situations, which I'd consider a good thing.
Feel free to share any thoughts on this, the finer points of OpenGL are
certainly not my specialty.
-James
|