fixed bug that sometimes decreased the height of textures to zero
massive rework; introduced frame buffer