🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

It is impossible to render a tall building or large terrain in OpenGL. OpenGL is broken. Do not use it.

Started by
16 comments, last by frob 20 hours, 48 minutes ago

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)?

Advertisement

What year is it? How old are you? You can't expect to use a 22 year old GPU and get modern graphics features. That's no fault of OpenGL.

Here is my terrain rendered in OpenGL 2.1+extensions, running (slowly) on a 2014 integrated intel GPU. These things are possible with sufficient skill and basic GPU features.

gamelordofdeath said:
I use GeForce 4 MX gpu and it doesn't support texture atlas (array).

It requires very modern OpenGL 3.0

GeForce 4 MX - Hardware released 2002. For the more popular DirectX versioning, that was DirectX 8 era hardware.

EXT_texture_array and OpenGL 3.0 were both standardized in 2008.

They're both the rough equivalent of DirectX 10 that launched with Windows Vista, the version between Windows XP and Windows 7. Most developers wouldn't consider that era of Windows Vista or DX10 to be “very modern”, at least, not now in 2024.

Old hardware doesn't magically get new features. There a few extensions that drivers might emulate, but most will fail when OpenGL procedures are loaded, and the functions will be invalid.

gamelordofdeath said:
Why stupid retarded OpenGL doesn't support basic feature like texture atlas yet they added other useless shit like Pixel/vertex shaders?

OpenGL supports the feature, and has done so since 2008. Your video card from 2002 does not.

Aressera said:
What year is it? How old are you?

Old.

Aressera said:
You can't expect to use a 22 year old GPU and get modern graphics features. That's no fault of OpenGL.

I don't want modern features. I want to render a building. Rendering a building is a basic feature, it should be available from the beginning. OpenGL didn't support building rendering for 16 years. How do you make a game without buildings?

Aressera said:
Here is my terrain rendered in OpenGL 2.1+extensions, running (slowly) on a 2014 integrated intel GPU. These things are possible with sufficient skill and basic GPU features.

If performance doesn't matter then you can render almost anything on GeForce 4 MX.

frob said:
Old hardware doesn't magically get new features. There a few extensions that drivers might emulate, but most will fail when OpenGL procedures are loaded, and the functions will be invalid.

Texture repeat + texture atlas is a basic feature that should be from the beginning. OpenGL didn't support rendering of buildings for 16 years. You cannot make a game without buildings.

frob said:
OpenGL supports the feature, and has done so since 2008. Your video card from 2002 does not.

They added it after 16 years. But what they added is shit. Because texture arrays that they added, require every texture in the array to be the same size.

How can I render buildings without texture arrays? I want old gpu support like GeForce 4 MX. We don't need stronger graphic cards than GeForce 4 MX. Games are becoming worse and worse with every year.

double check that you are using opengl with hardware acceleration. i seem to recall (many many years ago) having trouble loading the correct opengl library-- it would always load microsoft's basic software-only opengl library.

https://feedback.wildfiregames.com/report/opengl/feature/GL_EXT_texture_array

Geforce FX 5, 6, 7 series, do not support texture array.

So I will not use it.

fastcall22 said:
double check that you are using opengl with hardware acceleration. i seem to recall (many many years ago) having trouble loading the correct opengl library-- it would always load microsoft's basic software-only opengl library.

Yes I use hardware acceleration. It works fast, renders millions of triangles per second.

I also tested my game with MESA software rendering and then I get 10 FPS.

But it is not possible to render buildings in OpenGL, because you cannot combine texture repeat with texture atlas.

gamelordofdeath said:
But it is not possible to render buildings in OpenGL, because you cannot combine texture repeat with texture atlas.

Tens of thousands of games say otherwise.

YOU might not have the skills, but that doesn't mean the OpenGL isn't capable.

Even 24 years ago when your hardware was still fresh and new, games that were cutting edge at the time like GTA3 and Gran Turismo 3 took place in environments with large buildings. Similarly Halo and Deus Ex were exploring large worlds and complex maps,

Don't blame the tools. It isn't them, many others have done what you claim is “not possible”.

It's a common misconception that OpenGL can't handle large-scale rendering. With the right techniques, such as level-of-detail, frustum culling, and efficient data management, OpenGL is quite capable of rendering tall buildings and extensive terrains effectively. It's more about the implementation than the tool itself.

ChiefsCrusader said:
OpenGL is quite capable of rendering tall buildings and extensive terrains effectively. It's more about the implementation than the tool itself.

No you cannot. You either have to use 10000 triangles for one side of building (if you make two triangles per each window) or you have to use huge 8192x8192 texture. Or something between. But whatever you choose it's bad.

Why does crappy OpenGL require me to use 10000 triangles to draw a flat quad?

This topic is closed to new replies.

Advertisement