When I render my square, it makes a border to the texture.
Here the code of the soil's load:
textur[fNum] = SOIL_load_OGL_texture ( (char*)fName.c_str(), SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y );thanks.
Posted 13 March 2012 - 11:32 AM
textur[fNum] = SOIL_load_OGL_texture ( (char*)fName.c_str(), SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y );thanks.
Posted 13 March 2012 - 10:23 PM
glBegin(GL_QUADS); //create polygon glTexCoord2f((part/maxParts), 0.0f);glVertex2d(x, y); glTexCoord2f(((part+1.f)/maxParts), 0.0f);glVertex2d(x2, y); glTexCoord2f(((part+1.f)/maxParts), 1.0f);glVertex2d(x2, ny2); glTexCoord2f((part/maxParts), 1.0f);glVertex2d(x, ny2); glEnd();the variables are float.
Posted 14 March 2012 - 08:39 AM
Thanks, I had already tried that.i had the same ;p
try add something like this after image loadingglBindTexture(GL_TEXTURE_2D, textur[fNum]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
I didn't understand what you asked.So you've got many small images packed next to each other in a single texture? And when you render quads using these sub-images, the edges of the next sub-image bleed into your quad?
Posted 14 March 2012 - 06:00 PM
I was trying to clarify what it is that you're doing, as you've not given us much information or pictures of the problem.I didn't understand what you asked.