Fix for: http://projects.blender.org/tracker/index.php?func=detail&aid=20933&group_id=9&atid=498
Problem was 2-fold, first if you turn it to GL_NEAREST in get_cached_work_texture() then you can clearly see that the tex coords were off causing it to only map the first 255 pixels.
Fix that, turn back on linear but you still get seams because there are no border pixels to mix with when you break the image up into 256x256 squares.
There are two ways I found to fix this. One is to use opengl's border feature, but searching around shows that the border feature doesn't work with glTexSubImage2D, doesn't work great on all cards, and is now set to be deprecated, so that's not a great choice.
The other is to overlap the 256x256 squares so the edges are linearly blended and then correct each tex coord when it's displayed to remove the overlap. This patch basically does this by modifying the glaDrawPixelsTexScaled() function where the background is drawn. It only corrects for seams if the texture is bigger then 256x256. I've tested with several size textures and it appears to work just fine.
Right now it always tries to fix seams by default but could be changed to maybe a function variable so the calling code could decide if it wants seams or not. I haven't seen any places where this would be needed though.
Comments/tests/reviews welcome.
For reference:
http://www.vterrain.org/Textures/ground_textures.html
http://www.sjbaker.org/steve/omniv/tiling_textures.html
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=267170&page=1
Description
Description