OpenXRay / xray-16

Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. Join OpenXRay! ;)
https://discord.gg/sjRMQwv
Other
2.97k stars 456 forks source link

Glew to epoxy #1681

Closed sobkas closed 4 months ago

sobkas commented 4 months ago

Switch from ancient GLEW to libepoxy

AMS21 commented 4 months ago

libepoxys last release is 2 years old so why not use the still actively developed glad library, which also supports Vulkan out of the box?

sobkas commented 4 months ago

libepoxys last release is 2 years old so why not use the still actively developed glad library, which also supports Vulkan out of the box?

GLAD2 depends on generated code and this code is separated for each API. So for each API there are files(.c and .h) that would be included into OpenXRay. Epoxy needs only #include to be added.

Xottab-DUTY commented 4 months ago

libepoxys last release is 2 years old so why not use the still actively developed glad library, which also supports Vulkan out of the box?

GLEW's last release is 3 years old :)

Though, there's a bad sign there: libepoxy doesn't have any fresh commits since the last release, while glew has.

sobkas commented 4 months ago

libepoxys last release is 2 years old so why not use the still actively developed glad library, which also supports Vulkan out of the box?

GLEW's last release is 3 years old :)

Though, there's a bad sign there: libepoxy doesn't have any fresh commits since the last release, while glew has.

libepoxy is used by much more recent software, while glew usage is ancient.

AMS21 commented 4 months ago

libepoxys last release is 2 years old so why not use the still actively developed glad library, which also supports Vulkan out of the box?

GLEW's last release is 3 years old :)

Though, there's a bad sign there: libepoxy doesn't have any fresh commits since the last release, while glew has.

libepoxys last release is 2 years old so why not use the still actively developed glad library, which also supports Vulkan out of the box?

GLEW's last release is 3 years old :)

Though, there's a bad sign there: libepoxy doesn't have any fresh commits since the last release, while glew has.

Maybe I'm being missunderstood here I'm all for replacing the ancient GLEW library. My point was rather to maybe consider using the glad library I linked which latest release is about 1 Month old and still actively developed while also supporting all OpenGL extensions as well as Vulkan (which we might want to use in the future). Also glad directly parses the official OpenGL and Vulkan spec to generate it's glue code so even if the library is ever abandoned the parser should still be able to generate bindings for never versions of OpenGL and Vulkan (at least untill they make fundamental changes to the spec).

Xottab-DUTY commented 4 months ago

@AMS21 the @sobkas's concern is this:

GLAD2 depends on generated code and this code is separated for each API. So for each API there are files(.c and .h) that would be included into OpenXRay. Epoxy needs only #include to be added.

I also had a concern that if you select OpenGL 4.6, then you won't be able to use e.g. OpenGL 3.3 or OpenGL 2.0. But I just checked the generated files and found that we were (or I was) wrong.

GLAD2 supports working with multiple APIs simultaneously. On it's website you just need to select maximal OpenGL version and any lower version would be included. It also support header-only option.

Xottab-DUTY commented 4 months ago

So main concern with libepoxy is that it's author hadn't been active for two years. No commits, not even PR merges, etc. It also doesn't have simple global variables indicating if an extension is available. Honestly, they are pretty handy to use.

Xottab-DUTY commented 4 months ago

Superseded with #1684.