Hi Everyone!
I guess this topic is in every forum, but I can’t just find the answer! It doesn’t work, and I am about to give up .
I already posted this post in the Begginers´s forum, but I noticed that a similar question was found on the advanced section, so I re-posted here. I hope it´s the correct place.
I am using GL_CLAMP_TO_EDGE but seams still are visible.
I am using Visual Basic, and the reference file vbogl.tlb, does not include the GL_CLAMP_TO_EDGE constant; therefore, I defined:
Public Const GL_CLAMP_TO_EDGE = &H812F
This is my texture-loading routine:
code:
(...)'Create the Mipmapped Texture
glBindTexture glTexture2D,rsTexturesrsTextureSlot)
glTexParameteri glTexture2D,
tpnTextureMagFilter, GL_LINEARglTexParameteri
glTexture2D, tpnTextureMinFilter,
GL_LINEAR_MIPMAP_NEARESTgluBuild2DMipmaps
glTexture2D, 3, bmInfo.biWidth, bmInfo.biHeight,
tiBGRExt, _ GL_UNSIGNED_BYTE, ByVal VarPtr
(baImageData(0))
Call glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)
Call glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)
Other tecnical notices:
I am using texture mapping from 0 to 1. I read in some forums that drawing a border and reducing the texture size solves the problem, but that since you are not using power of 2 textures, it greatly reduces performance. Is this true?
I am using a texture bitmap that is 1024x1024.
And a glperspective with a near =1 and a far=2000. I tried reducing the far but the problem still persists.
The symptom is that I see stripped lines of black in the borders.
Please someone help me get this to work!. Thank you so much all in advance!