1
0
forked from 0ad/0ad
0ad/source/third_party/glad
Itms 0f87124b98
Some glad improvements
- Silence a MSVC warning in vulkan.cpp, refs #6987
- Document the patching of gl.h for macOS, from r26094
- Fix shellcheck warnings in the generation script
2024-09-08 09:26:46 +02:00
..
extensions Move glad from source-libs to source/third_party 2024-09-08 09:18:45 +02:00
include Some glad improvements 2024-09-08 09:26:46 +02:00
src Move glad from source-libs to source/third_party 2024-09-08 09:18:45 +02:00
README.md Some glad improvements 2024-09-08 09:26:46 +02:00
update-headers.cmd Move glad from source-libs to source/third_party 2024-09-08 09:18:45 +02:00
update-headers.sh Some glad improvements 2024-09-08 09:26:46 +02:00

Introduction

This folder contains the files generated by the glad GL loader for the game.

Instructions

Download glad v2:

git clone https://github.com/Dav1dde/glad.git -b glad2

Install the python dependencies

cd glad
pip install -r requirements.txt

Do not revert the WFG patch in include/glad/gl.h (around line 1765): do not add the change reverting it after the generation of the file

Build the source files for all four backends with their respective extensions

  • GL
    python -m glad --api="gl:core=2.1" --extensions="../extensions/gl.txt" --out-path="../" c
    
  • GLES2
    python -m glad --api="gles2=2.0" --extensions="../extensions/gles2.txt" --out-path="../" c
    
  • GLX
    python -m glad --api="glx=1.4" --extensions="../extensions/glx.txt" --out-path="../" c
    
  • WGL
    python -m glad --api="wgl=1.0" --extensions="../extensions/wgl.txt" --out-path="../" c
    
  • EGL
    python -m glad --api="egl=1.5" --extensions="../extensions/egl.txt" --out-path="../" c
    
  • Vulkan
    python -m glad --api="vulkan=1.1" --extensions="../extensions/vulkan.txt" --out-path="../" c
    

Rename all files to .cpp to prevent compilation warnings