>>glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
>>glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
=> the same effect
>>But I think the proper way would be to use ‘texture borders’.
Read the doc for glTexImage2D.
There is a parameter called ‘border’, often set to 0 : set it to 1, and send a larger texture, including a one pixel border copied from the adjacent texture.
Texture borders would be the easiest way to solve this one, without compositing both textures into one.
Basically you add one pixel all the way around the texture and specify the neighboring colors. So for example, your top texture’s bottom row (the border row) will be filled with the top row of the bottom texture (the actual texture, not the border row) and vice versa.
Then just pass 1 instead of 0 to the border parameter of glTexImage2D, and add 2 to the height and width.