File tree Expand file tree Collapse file tree 7 files changed +94
-0
lines changed Expand file tree Collapse file tree 7 files changed +94
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,19 @@ curl https://v2.ocaml.org/releases/$VERSION/ocaml-$VERSION-refman-html.tar.gz |
161
161
tar xz --transform ' s/htmlman/ocaml/' --directory docs/
162
162
```
163
163
164
+ ## Opengl
165
+
166
+ Clone https://github.com/KhronosGroup/OpenGL-Refpages.git
167
+
168
+ ``` sh
169
+ DEVDOCS_ROOT=/path/to/devdocs
170
+ git clone https://github.com/KhronosGroup/OpenGL-Refpages.git
171
+ mkdir $DEVDOCS_ROOT /docs/opengl~gl4
172
+ mkdir $DEVDOCS_ROOT /docs/opengl~gl2.1
173
+ cp -r OpenGL-Refpages/gl4/html/* " $DEVDOCS_ROOT /docs/opengl~gl4"
174
+ cp -r OpenGL-Refpages/gl2.1/xhtml/* " $DEVDOCS_ROOT /docs/opengl~gl2.1"
175
+ ```
176
+
164
177
## OpenJDK
165
178
Search 'Openjdk' in https://www.debian.org/distrib/packages , find the ` openjdk-$VERSION-doc ` package,
166
179
download it, extract it with ` dpkg -x $PACKAGE ./ ` and move ` ./usr/share/doc/openjdk-16-jre-headless/api/ `
Original file line number Diff line number Diff line change
1
+ module Docs
2
+ class Opengl
3
+ class CleanHtmlFilter < Filter
4
+ def call
5
+ # Rmeove table from function definitions
6
+ css ( '.funcprototype-table' ) . each do |node |
7
+ node . css ( 'td' ) . each do |data |
8
+ data . replace ( data . children )
9
+ end
10
+ node . css ( 'tr' ) . each do |row |
11
+ row . replace ( row . children )
12
+ end
13
+ node . wrap ( '<div>' )
14
+ node . parent [ 'id' ] = node . css ( '.fsfunc' ) . text
15
+ node . replace ( node . children )
16
+ end
17
+
18
+ doc
19
+ end
20
+ end
21
+ end
22
+ end
Original file line number Diff line number Diff line change
1
+ module Docs
2
+ class Opengl
3
+ class EntriesFilter < Docs ::EntriesFilter
4
+ def get_name
5
+ slug . chomp ( '.xhtml' ) . chomp ( '.xml' )
6
+ end
7
+
8
+ # gl4 also has documentation of GLSL, this string is present under Version Support
9
+ def get_type
10
+ return 'GLSL' if html . include? ( 'OpenGL Shading Language Version' )
11
+ 'OpenGL'
12
+ end
13
+
14
+ # functions like glUniform1f, glUniform2f, glUniform... have the same documentation
15
+ def additional_entries
16
+ entries = [ ]
17
+ css ( '.fsfunc' ) . each do |function |
18
+ entries << [ function . text , function . text ]
19
+ end
20
+ entries
21
+ end
22
+ end
23
+ end
24
+ end
Original file line number Diff line number Diff line change
1
+ module Docs
2
+ class Opengl < FileScraper
3
+ self . type = 'simple'
4
+ self . root_path = 'index.php'
5
+ self . links = {
6
+ home : 'https://registry.khronos.org/OpenGL-Refpages/'
7
+ }
8
+ html_filters . push 'opengl/entries' , 'opengl/clean_html'
9
+
10
+ # indexflat.php is a copy of index.php
11
+ options [ :skip ] = %w( indexflat.php )
12
+
13
+ options [ :attribution ] = <<-HTML
14
+ Copyright 2017-2021 The Khronos Group, Inc.. This work is licensed
15
+ under a < a href ="http://creativecommons.org/licenses/by/4.0/ "> Creative
16
+ Commons Attribution 4.0 International License</ a > .
17
+ HTML
18
+
19
+ version 'gl2.1' do
20
+ self . root_path = 'index.html'
21
+ self . release = 'gl2.1'
22
+ self . base_url = "https://registry.khronos.org/OpenGL-Refpages/#{ self . version } /"
23
+ end
24
+ version 'gl4' do
25
+ self . root_path = 'index.php'
26
+ self . release = 'gl4'
27
+ self . base_url = "https://registry.khronos.org/OpenGL-Refpages/#{ self . version } /"
28
+ end
29
+
30
+ def get_latest_version ( opts )
31
+ return 'v1.0.0'
32
+ end
33
+ end
34
+ end
Original file line number Diff line number Diff line change
1
+ https://www.khronos.org/legal/trademarks/
You can’t perform that action at this time.
0 commit comments