I am using opengl in a tilemap editor. Storing the tilemap in GL_LUMINANCE32F format, then modifying it with opengl commands.
Now, I'm realising canvas size limitations are a burden for people drawing tilemaps. So how could I implement an infinite canvas? (such that expands and shrinks without user needing to explicitly trigger it to expand or shrink)
The expanding or shrinking of the canvas in need isn't hard, I can easily create another canvas, move the old canvas contents on it and remove the old canvas. Instead, what I have no clue of is that how could I get the canvas to detect when it can shrink, and how much can it shrink?
So I should detect how many rows and columns of zeroes I have in edges of my canvas.