diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md
index 478099b4..ad035d64 100644
--- a/docs/file-scrapers.md
+++ b/docs/file-scrapers.md
@@ -161,6 +161,19 @@ curl https://v2.ocaml.org/releases/$VERSION/ocaml-$VERSION-refman-html.tar.gz |
tar xz --transform 's/htmlman/ocaml/' --directory docs/
```
+## Opengl
+
+Clone https://github.com/KhronosGroup/OpenGL-Refpages.git
+
+```sh
+DEVDOCS_ROOT=/path/to/devdocs
+git clone https://github.com/KhronosGroup/OpenGL-Refpages.git
+mkdir $DEVDOCS_ROOT/docs/opengl~gl4
+mkdir $DEVDOCS_ROOT/docs/opengl~gl2.1
+cp -r OpenGL-Refpages/gl4/html/* "$DEVDOCS_ROOT/docs/opengl~gl4"
+cp -r OpenGL-Refpages/gl2.1/xhtml/* "$DEVDOCS_ROOT/docs/opengl~gl2.1"
+```
+
## OpenJDK
Search 'Openjdk' in https://www.debian.org/distrib/packages, find the `openjdk-$VERSION-doc` package,
download it, extract it with `dpkg -x $PACKAGE ./` and move `./usr/share/doc/openjdk-16-jre-headless/api/`
diff --git a/lib/docs/filters/opengl/clean_html.rb b/lib/docs/filters/opengl/clean_html.rb
new file mode 100644
index 00000000..c7f300c5
--- /dev/null
+++ b/lib/docs/filters/opengl/clean_html.rb
@@ -0,0 +1,22 @@
+module Docs
+ class Opengl
+ class CleanHtmlFilter < Filter
+ def call
+ # Rmeove table from function definitions
+ css('.funcprototype-table').each do |node|
+ node.css('td').each do |data|
+ data.replace(data.children)
+ end
+ node.css('tr').each do |row|
+ row.replace(row.children)
+ end
+ node.wrap('
')
+ node.parent['id'] = node.css('.fsfunc').text
+ node.replace(node.children)
+ end
+
+ doc
+ end
+ end
+ end
+ end
diff --git a/lib/docs/filters/opengl/entries.rb b/lib/docs/filters/opengl/entries.rb
new file mode 100644
index 00000000..0b56c7ee
--- /dev/null
+++ b/lib/docs/filters/opengl/entries.rb
@@ -0,0 +1,24 @@
+module Docs
+ class Opengl
+ class EntriesFilter < Docs::EntriesFilter
+ def get_name
+ slug.chomp('.xhtml').chomp('.xml')
+ end
+
+ # gl4 also has documentation of GLSL, this string is present under Version Support
+ def get_type
+ return 'GLSL' if html.include?('OpenGL Shading Language Version')
+ 'OpenGL'
+ end
+
+ # functions like glUniform1f, glUniform2f, glUniform... have the same documentation
+ def additional_entries
+ entries = []
+ css('.fsfunc').each do |function|
+ entries << [ function.text, function.text ]
+ end
+ entries
+ end
+ end
+ end
+end
diff --git a/lib/docs/scrapers/opengl.rb b/lib/docs/scrapers/opengl.rb
new file mode 100644
index 00000000..09bc4b7a
--- /dev/null
+++ b/lib/docs/scrapers/opengl.rb
@@ -0,0 +1,34 @@
+module Docs
+ class Opengl < FileScraper
+ self.type = 'simple'
+ self.root_path = 'index.php'
+ self.links = {
+ home: 'https://registry.khronos.org/OpenGL-Refpages/'
+ }
+ html_filters.push 'opengl/entries', 'opengl/clean_html'
+
+ # indexflat.php is a copy of index.php
+ options[:skip] = %w(indexflat.php)
+
+ options[:attribution] = <<-HTML
+ Copyright 2017-2021 The Khronos Group, Inc.. This work is licensed
+ under a
Creative
+ Commons Attribution 4.0 International License.
+ HTML
+
+ version 'gl2.1' do
+ self.root_path = 'index.html'
+ self.release = 'gl2.1'
+ self.base_url = "https://registry.khronos.org/OpenGL-Refpages/#{self.version}/"
+ end
+ version 'gl4' do
+ self.root_path = 'index.php'
+ self.release = 'gl4'
+ self.base_url = "https://registry.khronos.org/OpenGL-Refpages/#{self.version}/"
+ end
+
+ def get_latest_version(opts)
+ return 'v1.0.0'
+ end
+ end
+end
diff --git a/public/icons/docs/opengl/16.png b/public/icons/docs/opengl/16.png
new file mode 100644
index 00000000..92a58e08
Binary files /dev/null and b/public/icons/docs/opengl/16.png differ
diff --git a/public/icons/docs/opengl/16@2x.png b/public/icons/docs/opengl/16@2x.png
new file mode 100644
index 00000000..31143bb8
Binary files /dev/null and b/public/icons/docs/opengl/16@2x.png differ
diff --git a/public/icons/docs/opengl/SOURCE b/public/icons/docs/opengl/SOURCE
new file mode 100644
index 00000000..bb57df17
--- /dev/null
+++ b/public/icons/docs/opengl/SOURCE
@@ -0,0 +1 @@
+https://www.khronos.org/legal/trademarks/