mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
2da1c1c10e
We now generate all LibGL API wrappers from a single API method definition list stored in `GLAPI.json`. Since a significant portion of the OpenGL API methods are relatively consistent variants, we take advantage of this to generate a lot of these variants at once. The autogenerated methods check for the non-nullness of the current `GLContext`, and only perform an action if a `GLContext` is present. This prevents a crash in ports like GLTron, who assume you can still call the OpenGL API without an active context. This increases our API wrapper method count from 211 to 356. Fixes #15814.
30 lines
513 B
CMake
30 lines
513 B
CMake
include(libgl_generators)
|
|
|
|
set(SOURCES
|
|
Buffer/Buffer.cpp
|
|
Buffer.cpp
|
|
ClipPlane.cpp
|
|
ContextParameter.cpp
|
|
GLContext.cpp
|
|
Image.cpp
|
|
Lighting.cpp
|
|
List.cpp
|
|
Matrix.cpp
|
|
NameAllocator.cpp
|
|
Shader.cpp
|
|
Shaders/Program.cpp
|
|
Shaders/Shader.cpp
|
|
Stencil.cpp
|
|
Tex/Texture2D.cpp
|
|
Texture.cpp
|
|
Vertex.cpp
|
|
)
|
|
|
|
generate_libgl_implementation()
|
|
|
|
set(GENERATED_SOURCES
|
|
GLAPI.cpp)
|
|
|
|
serenity_lib(LibGL gl)
|
|
target_link_libraries(LibGL PRIVATE LibCore LibGfx LibGLSL LibGPU)
|