Archived

This topic is now archived and is closed to further replies.

Clash Rocker

[SDL-GL]Lost my bilinear texture filtering

Recommended Posts

Hello all, (more SDL and OpenGL troubles) I have my 640x400 BMP loaded into an SDL surface, I then blit/seperate that surface onto 128x512 surfaces so I can then use them for OpenGL textures but... .. when I draw my quads and then texture map them with each texture I don't get any bi-linear texture filtering. The textures are mapped and rendered, but no smoothiness :-( I'm not sure what's causing this problem, I used to use textures sized at 512x256 and they were fine. Anyways any help would be greatly appreciated. To take a gander at my code: http://www4.tpg.com.au/users/jhogge/surface2texture.c++ Thanks in advance [edited by - Clash Rocker on September 1, 2002 1:20:19 AM]

Share this post


Link to post
Share on other sites
I don''t know why you don''t get linear filtring, try updating thedriver as first spet, but I have samoething to say abozut your coed:

_don''t_ call gltexImage2D every frame, it''s gonna kill your performance. Just create the textures once and tehn only biind them.

try using trilinear fiiltering wit gluBuild22DMipmaps. In your case it can be that a smaller texture uses a minyfying filter , and GL_LINEAR look s pretty bdabd.

-Lev

P.s: sorry foor spelling mistakes I''m totally drunk.


Yo!

Share this post


Link to post
Share on other sites
quote:
Original post by Lev Povalahev
I don''t know why you don''t get linear filtring, try updating thedriver as first spet, but I have samoething to say abozut your coed:

_don''t_ call gltexImage2D every frame, it''s gonna kill your performance. Just create the textures once and tehn only biind them.

try using trilinear fiiltering wit gluBuild22DMipmaps. In your case it can be that a smaller texture uses a minyfying filter , and GL_LINEAR look s pretty bdabd.

-Lev

P.s: sorry foor spelling mistakes I''m totally drunk.
Yo!

Haha!
Thanks for the help, I''ll try you suggestions

Share this post


Link to post
Share on other sites
with a 256x512 u wont see any smoothing unless u show it at a higher resolution eg 1024x2048 +.
ie showing the texture with 256x512 pixels on the screen will look the same

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
i think u misunderstood me,
i meant with higher resolutions eg 512 u mightnt be able to tell if theyre billearfiltered
ie GL_LINEAR will look a lot like GL_NEAREST
.
try using 8x32 size texture + draw it so it covers the whole screen.
here GL_LINEAR wont look like GL_NEAREST.
if not then u have a problem

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites