• Advertisement
Sign in to follow this  

Question on textures clippings

This topic is 4091 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

this code draws a specific portion of the texture, yet it seems like every few tiles it will grab a small sliver of the portion left or right of it...
glTexCoord2f(float(((.25) * (tilex))), float(((.25) * ((tiley))))); glVertex3f(float(x), float(y), 0.0f);
		glTexCoord2f(float(((.25) * (tilex+1))), float(((.25) * ((tiley))))); glVertex3f(float((x + 1)), float(y), 0.0f);
		glTexCoord2f(float(((.25) * (tilex+1))), float(((.25) * (tiley+1)))); glVertex3f(float((x + 1)), float((y + 1)), 0.0f);
		glTexCoord2f(float(((.25) * (tilex))), float(((.25) * (tiley+1)))); glVertex3f(float(x), float((y + 1)), 0.0f);
Edit: i do believe i resolved the problem with this
glTexCoord2f(float(((.25) * (tilex))+.01), float(((.25) * ((tiley))))+.01); glVertex3f(float(x), float(y), 0.0f);
		glTexCoord2f(float(((.25) * (tilex+1))-.01), float(((.25) * ((tiley))))+.01); glVertex3f(float((x + 1)), float(y), 0.0f);
		glTexCoord2f(float(((.25) * (tilex+1))-.01), float(((.25) * (tiley+1)))-.01); glVertex3f(float((x + 1)), float((y + 1)), 0.0f);
		glTexCoord2f(float(((.25) * (tilex))+.01), float(((.25) * (tiley+1)))-.01); glVertex3f(float(x), float((y + 1)), 0.0f);
[Edited by - Solance on November 6, 2006 11:22:36 PM]

Share this post


Link to post
Share on other sites
Advertisement
What mode are you using? GL_REPEAT? GL_CLAMP? Are you using mipmapping? If so don't use trilinear filtering or anisotropy filtering. Use nearest.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement