Prevent texture bleeding on quad rendering

Clamp texture to the edge when the texturecoords are between 0 and 1 else use the normal wrapping mode

This is targetting #1226