I am planning to write a simple 2D platformer in Javascript where each frame will be drawn with different (textured) tiles. Here are my questions:
How do I render different rectangles / quads with different textures? I mean do I write a separate fragment shader for rock tiles and grass tiles, and do I keep the vertex data for each type of tile in a separate buffer? I want to put all my tile vertex data in one buffer, but how do I specify that THIS tile is a grass tile which must get THAT grass texture?
How big can my textures be when I bind them to a texture unit?