It is impossible to render a tall building or large terrain in OpenGL. OpenGL is broken. Do not use it.
OpenGL doesn't support texture repeat with texture atlas. OpenGL is crap. How to create a building in OpenGL?
How is it even possible to make a game without texture atlas? How to make a tall building with a single quad?
How to make a large tall building with 50x100 windows (5000 windows) without texture atlas?
Method 1. make a texture of one window and use texture repeat. If I use this, I will have to use a VBO and texture only for one building sides. I will not be able to have any other things in the texture. I will have to switch vbo and texture for every building that I want to render.
Method 2. make a quad (two triangles) for every window. 5000 windows = 10000 triangles, just to create a flat surface. But it allows to use texture atlas.
Method 3. a mix method between 1 and 2. I will not tell you more because you will steal my idea.
Method 4. make a quad for entire building side and apply a huge texture with all windows. This method uses a lot of video memory, the texture will have to be huge, like 4096 height or more.
Method 5. make a quad for entire building and use window texture from texture array (GL_EXT_texture_array) and repeat it over the quad to produce as many windows as you want. This method requires GL_EXT_texture_array so I cannot use it.
Texture atlas (array) feature is available as extension in OpenGL.
Here is a list of GPU that support and do not support it
https://feedback.wildfiregames.com/report/opengl/feature/GL_EXT_texture_array
If you scroll down to the bottom, you will see many Intel and Nvidia cards that do not support it.
I use GeForce 4 MX gpu and it doesn't support texture atlas (array).
Here is more information about texture array.
https://www.khronos.org/opengl/wiki/Array_Texture
It requires very modern OpenGL 3.0 and it doesn't support fixed pipeline.
So how to make a building without texture array?
inb4 "just use one big texture and use tex coords as texture atlas"
No, this won't work. Because you won't be able to use repeating texture over one big triangle.
you cannot use this to make 100 windows in huge building
without texture atlas support you need huge texture with 100 windows,
or you need to make 100 quads (200 triangles) to make flat surface...
Grand Theft Auto Vice City has tall buildings and it runs on Geforce4 MX. How did they make the windows on buildings? With huge texture?
How was it even possible to make a video game in old times without texture array?
Why stupid retarded OpenGL doesn't support basic feature like texture atlas yet they added other useless shit like Pixel/vertex shaders?
And also, texture array extension (GL_EXT_texture_array) is shit. It requires all textures to be the same size. So it is not a replacement for texture atlas.
Why can't I use traditional texture atlas with ability to repeat selected texture from texture atlas?
GL_REPEAT does not work with texture atlas.
OpenGL is crap shit.
How did nobody invent such basic feature over years? Why they added 1000 other useless shits instead of this?
What is even the fucking point of GL_REPEAT if you cannot use it with texture atlas? What do they want me to do? Switch texture 1000 times in single frame rendering?
It is not possible to create any video game without GL_REPEAT + texture atlas, so why does opengl exists?
They added texture array after 20 years of opengl. But even then, texture array is shit, it forces the same size for every texture.
OpenGL 1.0 was released in 1992.
Texture array got added in 2008.
What did they do for 16 years? There was no support to create a tall building for 16 years.
It took them 16 years to add support for buildings with windows. And the support they added is shit.
So, how to make a tall building in OpenGL?
How to make large terrain with various repeating textures (grass and other surfaces)?