Hello Guest

displaying large textures (composed from small ones)

  • 4 Replies
  • 6107 Views
displaying large textures (composed from small ones)
« on: March 09, 2005, 10:08:06 »
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):


thanks in advance,

chris

hmmmm...
« Reply #1 on: March 09, 2005, 19:14:58 »
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: )
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

displaying large textures (composed from small ones)
« Reply #2 on: March 09, 2005, 23:01:46 »
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

*

Offline princec

  • *****
  • 1933
    • Puppygames
displaying large textures (composed from small ones)
« Reply #3 on: March 09, 2005, 23:25:31 »
If anything it'll speed it up.

Cas :)

*

Offline Chman

  • ***
  • 100
    • http://www.shakebox.org
displaying large textures (composed from small ones)
« Reply #4 on: March 10, 2005, 01:48:51 »
.. but you'll get a horrible result if you zoom on the texture ...

Chman