Hi there,
I'd like to display some kind of video sequence in my game. therefore we rendered it (taken from 3d studio) in 512x384 resolution (to use less RAM in the game).
then we cut the frames in pieces of 128x128 (4 horizontal and 3 vertical) to display them as textured rectangles in opengl.
so far so good - it works perfectly when I show the video in 512x384. but when i display it in 800x600 (so every piece is zoomed to 200x200) we see small horizontal and vertical lines between the texture pieces :(
i ran a search through this forum and red something about "clamp_to_edge" but it doesnt changed anything :?
anyone can help?
here's a screenshot of the video (and the hor. and vert. lines):
(http://www.eolh.com/mh2.jpg)
thanks in advance,
chris
Are you applying texture filtering to the textures? (Bi-linear, Tri-linear)
I think the lines are sometimes a result of filtering. (I could be wrong :lol: )
yep! perfect answer!!! :D
i found the following lines:
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
and i changed them to:
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
now the lines have disappeared :D
i only hope that it doesnt slow down the rendering. :?
thanks a lot
chris
If anything it'll speed it up.
Cas :)
.. but you'll get a horrible result if you zoom on the texture ...
Chman