Remix.run Logo
▲ Narishma 5 hours ago

GL 2.1 supports shaders.

▲pjmlp 5 hours ago | parent [-]

I know, but it still has lots of baggage and missing features, which is why game engines that support OpenGL tend to target OpenGL 3.3 as the minimum baseline, given that it used to be widely deployed.

▲Narishma 5 hours ago | parent [-]

But we're talking about AI generated code here, it shouldn't have any difficulty supporting the older API if it has the necessary features. For PS2 games I think GL 2.1 (or GL ES 2.0 or WebGL 1 which are all more or less the same thing) is largely sufficient.

▲pjmlp 4 hours ago | parent [-]

Yeah, but I am speaking about what the hardware can do, also I don't see why target WebGL 1.0 in the days of WebGPU, WebGL 2.0 yes, because WebGPU isn't yet widely available.

Now, OpenGL ES 2.0 isn't OpenGL 2.0, this is the trap of those that think OpenGL is the same everywhere.

Also OpenGL 3.3 is from 2010, whereas OpenGL 2.1 was designed for 2006 hardware, how back you want to get?

▲Narishma 4 hours ago | parent [-]

> also I don't see why target WebGL 1.0 in the days of WebGPU, WebGL 2.0 yes, because WebGPU isn't yet widely available.

Because not every hardware capable of running PS2 level games supports the newer APIs.

> Also OpenGL 3.3 is from 2010, whereas OpenGL 2.1 was designed for 2006 hardware, how back you want to get?

Doesn't matter how old it is, what matters is if it has the required features or not. For the use case being discussed, GL 2.1 is sufficient so there's no good reason to not target it. That's my philosophy at least. When I write code, I always use the oldest library or API that has the stuff I need. I don't just go automatically for the latest one.