The current bgl are outdated.
Instead of going through all functions and updating them, I just linked every function to the official documentation (as discussed in T60891).
The bgl docs should focus on how to use the normal OpenGL functions in Blender.
This can be achieved by providing some more examples.
However, I'd like to keep that separate from this patch.
The script to find all links:
import re import bpy import bgl import requests from pprint import pprint def get_function_names_in_bgl(): def gl_filter(name): return name.startswith("gl") return list(filter(gl_filter, dir(bgl))) def get_function_links(): link_prefix = "https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/" flat_index_html = requests.get(link_prefix + "indexflat.php").text links = {} for line in flat_index_html.splitlines(): line = line.strip() match = re.match(r"<li><a href=\"(.*)\" target=\"pagedisplay\">(\w+)<", line) if match is None: continue file_name = match.group(1) function_name = match.group(2) links[function_name] = link_prefix + file_name return links output_parts = [] function_links = get_function_links() for function_name in sorted(get_function_names_in_bgl()): link = function_links[function_name] output_parts.append(f"- `{function_name} <{link}>`__") output = "\n".join(output_parts) print(output) bpy.context.window_manager.clipboard = output
I put all functions in a list to reduce the line spacing.
That makes it much easier to scan through the list.