Problem with texture Mapping

Started by rattle, May 14, 2005, 18:43:47

Previous topic - Next topic

rattle

Hallo everybody,

many hours of the past months, i've spent developing a game using the java lightweight game library and now it's the first time, i have to face a problem which seems unsolvable to me.

Some textures (with transparent backgrounds) reach the edges on one side, and when they are mapped and displayed in the game, you can see a small stripe on the opposite side, which is very annoying.

If anyone of you could possibly tell me what to do, or give some hints, what the problem could be, i would be very grateful.

cheers

rafael

Skippy0

Use clamping so the tile is not repeated/tiled:

boolean clamp = ...;

GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, clamp ? GL11.GL_CLAMP : GL11.GL_REPEAT);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, clamp ? GL11.GL_CLAMP : GL11.GL_REPEAT);

rattle

thank you!

seems to work!