diff --git a/compile.py b/compile.py index 170393f6..91a36dff 100644 --- a/compile.py +++ b/compile.py @@ -193,8 +193,8 @@ def create_directory(dir): if version in all_major_versions_available: index_versions_commands += "" + version + "" else: - index_versions_commands += " " - index_versions_commands += "
\n" + index_versions_commands += "" + version + "" + index_versions_commands += "\n" #GLSL Loop for command in glsl_index_commands_version: @@ -267,8 +267,11 @@ def create_directory(dir): else: glsl_index_versions_commands += "glsl-es" + version[2:3] + "" else: - glsl_index_versions_commands += " " - glsl_index_versions_commands += "
\n" + if version[0:2] == "sl": + glsl_index_versions_commands += "glsl" + version[2:3] + "" + else: + glsl_index_versions_commands += "glsl-es" + version[2:3] + "" + glsl_index_versions_commands += "\n" index = index.replace("{$commandlist}", index_versions_commands+glsl_index_versions_commands) @@ -611,13 +614,13 @@ def spew_category(name, commands, current_command, api): selected = " selected='selected'" if version_option[:2] == 'gl': - toc_versions_options = toc_versions_options + "" + toc_versions_options = toc_versions_options + "" elif version_option[:2] == 'es': - toc_versions_options = toc_versions_options + "" + toc_versions_options = toc_versions_options + "" elif version_option[:2] == 'sl': - toc_versions_options = toc_versions_options + "" + toc_versions_options = toc_versions_options + "" elif version_option[:2] == 'el': - toc_versions_options = toc_versions_options + "" + toc_versions_options = toc_versions_options + "" header_for_version = header_for_version.replace("{$versions_options}", toc_versions_options) @@ -814,7 +817,7 @@ def replace_alias(matchobj): code = re.sub(r"\{%([a-zA-Z_][a-zA-Z_0-9]*?)\}", replace_alias, code).replace("\t", " ").replace("&", "&") code = re.sub(r"(?\1", code) - code = re.sub(r"(GL_[A-Z_]*)", r"\1", code) + code = re.sub(r"(GL_[A-Z_0-9]*)", r"\1", code) code = re.sub(r'(".*?")', r"\1", code) code = re.sub(r'(//.*?)\n', r"\1\n", code) diff --git a/html/copy/about.html b/html/copy/about.html index 9ac88002..3fee53a8 100644 --- a/html/copy/about.html +++ b/html/copy/about.html @@ -20,18 +20,54 @@ }); + -
-
-OpenGL API Documentation


+
+
+
+
+

docs.GL

+

OpenGL API Documentation

+
+
-

docs.gl is an improvement of the official OpenGL documentation. It was written by Jorge Rodríguez. Each reference page is under individual copyright listed in that entry, all other content is in the public domain. docs.gl is completely unaffiliated with OpenGL and Khronos.

-

Anyone can contribute to docs.gl to improve the OpenGL documentation. The source code to docs.gl is available on GitHub. Pull requests and suggestions are welcome.

-

Full list of contributors

-

Download docs.gl for offline use.

-

Back

+
+

docs.gl is an improvement of the official OpenGL documentation. It was written by Jorge Rodríguez. GLSL support was contributed by Sohail Ajmal. Additional site design improvements were contributed by Felix Kaaman. Each reference page is under individual copyright listed in that entry, all other content is in the public domain. docs.gl is completely unaffiliated with OpenGL and Khronos.

+

Anyone can contribute to docs.gl to improve the OpenGL documentation. The source code to docs.gl is available on GitHub. Pull requests and suggestions are welcome.

+

Full list of contributors

+

Download docs.gl for offline use.

+
diff --git a/html/copy/docs.gl.js b/html/copy/docs.gl.js index fc81fafc..414bbec2 100644 --- a/html/copy/docs.gl.js +++ b/html/copy/docs.gl.js @@ -166,13 +166,15 @@ function set_api_version(version) { } $(function() { + $( "#command_categories" ).bonsai(); $( "#glsl_command_categories" ).bonsai(); $( "#versions_dropdown" ).selectmenu({ change: function( event, ui ) { set_api_version(ui.item.value); - } + }, + width: 150 }); if (typeof $.cookie("hide_deprecated") != 'undefined') @@ -223,9 +225,7 @@ $(function() { search_fn = function(value) { - version = $("#search_versions").val(); - if (!version || typeof version == 'undefined') - version = 'all'; + var version = 'all'; if (search_versions[version].indexOf(value) < 0) return; @@ -259,19 +259,8 @@ $(function() { }, }); - $( "#search_versions" ).selectmenu({ - change: function( event, ui ) { - $("#search").val(""); - $("#search").autocomplete( "option", "source", search_versions[$("#search_versions").val()] ); - }, - width: 70, - }); - if (typeof $.cookie("api_version") != 'undefined') - { - $("#search_versions").val($.cookie("api_version").substring(0, 3) + "." + $.cookie("api_version").substring(3, 4)).selectmenu('refresh'); - $("#search").autocomplete( "option", "source", search_versions[$("#search_versions").val()] ); - } + $("#search").autocomplete( "option", "source", "all" ); $('#hide_deprecated').click(function() { window.hide_deprecated = $(this).is(':checked'); diff --git a/html/copy/logo-lg.png b/html/copy/logo-lg.png deleted file mode 100644 index 595f2055..00000000 Binary files a/html/copy/logo-lg.png and /dev/null differ diff --git a/html/copy/logo.png b/html/copy/logo.png deleted file mode 100644 index 7caee957..00000000 Binary files a/html/copy/logo.png and /dev/null differ diff --git a/html/copy/style.css b/html/copy/style.css index 7081d0cd..2532e0b7 100644 --- a/html/copy/style.css +++ b/html/copy/style.css @@ -167,24 +167,56 @@ a { overflow-y: scroll; } -#header { - width: 100%; - background-color: #aaa; - height: 55px; - border-bottom: 1px solid #666; +.toggle-container { + position: absolute; + top: 0; + right: 5px; +} + +.thicken { + font-weight: 500; +} + +.function { + border-radius: 2px; +} + +.header-bg { + } -#header_inner { +.header-container { width: 950px; - height: 55px; + margin-left: auto; margin-right: auto; + + padding-top: 20px; + padding-bottom: 20px; +} + +.header-inner { + display: inline-block; + position: relative; + width: 100%; +} + +.header-logo { + display: inline-block; + margin-top: 10px; + margin-bottom: 10px; + margin-left: 20px; } -#search_div { +.search-div { float: right; margin: 18px; margin-top: 8px; + display: inline-block; +} + +#search { + } #search_button { @@ -194,11 +226,6 @@ a { top: -1px; } -#search_versions-button { - position: relative; - top: 8px; -} - #styles { float: right; color: black; @@ -216,10 +243,6 @@ a { margin: 20px; } -#hide_label { - font-size: 11px; -} - #khronos { width: 610px; float: left; @@ -245,26 +268,23 @@ a { #versions_container { float: left; display: block; - width: 120px; - text-align: right; + margin-bottom: 30px; } -#api { - padding: 2px; - margin-left: 8px; - float: left; +#versions_dropdown-button > span.ui-selectmenu-text { + font-size: 18px; + font-weight: bold; } -#command_versions { - float: right; +#hide_label { + font-size: 11px; } -#opengl_name { - width: 125px; - display: block; - float: left; - margin-top: 2px; - font-size: 16px; +#hide_deprecated { +} + +#command_versions { + float: right; } #command_categories, #command_categories a { @@ -338,51 +358,35 @@ a { width: 950px; margin-left: auto; margin-right: auto; - margin-top: 180px; + margin-top: 30px; text-align: center; } -.apibuttons { - float: left; - font-size: 20px; - margin-left: 20px; - margin-top: 10px; -} - -#es_api { - width: 150px; -} - -#gl_api { - width: 550px; -} - -#allapi { - width: 50px; -} - -#buttonpanel { - width: 780px; - margin-left: auto; - margin-right: auto; - margin-bottom: 80px; -} - -#buttonpanel_sl { - width: 550px; - margin-left: auto; - margin-right: auto; - margin-bottom: 180px; +#frontsearch, #search { + font-size: 14px; + border-radius: 4px; + outline: none; + padding: 4px; + width: 275px; + font-family: Roboto, Helvetica; + margin-left: 10px; + float:left; } -#front_instructions { - font-style: italic; - color: #bbb; - text-align: center; +#search { + margin:0; + position: absolute; + bottom:0; + right: 30px; } -#frontsearch { - font-size: 22px; +#search_button { + margin: 0; + margin-top: 13px; + position: absolute; + bottom: 0px; + right: 0px; + height: 30px; } #frontsearch_button { @@ -394,7 +398,6 @@ a { } #outer_disqus_thread { - background-color: #eee; padding: 10px; margin-top: 10px; -} \ No newline at end of file +} diff --git a/html/copy/style_dark.css b/html/copy/style_dark.css index b81c4f56..64dd449a 100644 --- a/html/copy/style_dark.css +++ b/html/copy/style_dark.css @@ -1,22 +1,46 @@ body { - background: #191919; + background: #41444A; color: #ddd; } a { - color: #3a85de; + color: #88B4E7; } a:visited { - color: #589cec; + color: #5B7EA6; } a:hover { - color: #71acf1; + color: #5B93D0; } -.commandcolumn, .versioncolumn, .slversioncolumn { - background-color: #111; +.logo-bg, .header-bg { + background: rgba(40,42,46,1); + background: -moz-linear-gradient(-45deg, rgba(40,42,46,1) 0%, rgba(55,59,65,1) 100%); + background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(40,42,46,1)), color-stop(100%, rgba(55,59,65,1))); + background: -webkit-linear-gradient(-45deg, rgba(40,42,46,1) 0%, rgba(55,59,65,1) 100%); + background: -o-linear-gradient(-45deg, rgba(40,42,46,1) 0%, rgba(55,59,65,1) 100%); + background: -ms-linear-gradient(-45deg, rgba(40,42,46,1) 0%, rgba(55,59,65,1) 100%); + background: linear-gradient(135deg, rgba(40,42,46,1) 0%, rgba(55,59,65,1) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#282a2e', endColorstr='#373b41', GradientType=1 ); +} + +.logo, .header-logo { + color: #C8C4BE; +} + +.logo-desc { + color: #707880; +} + +.result-headers span { + color: #bababa; +} + +.indexcommand { + background-color: #34373D; + color: #aaa; } .function { @@ -25,7 +49,7 @@ a:hover { } .constant { - color: #ba27de; + color: #b294bb; } .disabled, .disabled a, a.disabled { @@ -64,28 +88,29 @@ a:hover { .ui-menu-item { color: #ddd; - background-color: #111; + background-color: #282a2e; } .ui-selectmenu-open ul .ui-state-focus, .ui-state-default { color: #fff; - background-color: #222; + background-color: #34373D; } .ui-autocomplete .ui-state-focus, .ui-state-default { color: #fff; - background-color: #222; + background-color: #34373D; } -#buttonpanel div .ui-state-default { - background-color: #222; +#frontsearch, #search { + border: 1px solid #555; + background-color: #41444A; + color: #cecece; } -#buttonpanel div .ui-state-active { - background-color: #444; +#frontsearch:focus, #search:focus { + border: 1px solid #787878; } -#front_page img { - border: 1px solid #fff; - background: #ccc; -} \ No newline at end of file +#outer_disqus_thread { + background-color: #34373D; +} diff --git a/html/copy/style_light.css b/html/copy/style_light.css index 15840c76..f14a8338 100644 --- a/html/copy/style_light.css +++ b/html/copy/style_light.css @@ -15,8 +15,43 @@ a:hover { color: #358acc; } -.commandcolumn, .versioncolumn, .slversioncolumn { - background-color: #eee; +.header-bg { + background: rgba(112,120,128,1); + background: -moz-linear-gradient(-45deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(112,120,128,1)), color-stop(100%, rgba(197,200,198,1))); + background: -webkit-linear-gradient(-45deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + background: -o-linear-gradient(-45deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + background: -ms-linear-gradient(-45deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + background: linear-gradient(135deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#707880', endColorstr='#c5c8c6', GradientType=1 ); +} + +.logo-bg { + background: rgba(112,120,128,1); + background: -moz-linear-gradient(-45deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(112,120,128,1)), color-stop(100%, rgba(197,200,198,1))); + background: -webkit-linear-gradient(-45deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + background: -o-linear-gradient(-45deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + background: -ms-linear-gradient(-45deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + background: linear-gradient(135deg, rgba(112,120,128,1) 0%, rgba(197,200,198,1) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#707880', endColorstr='#c5c8c6', GradientType=1 ); +} + +.logo, .header-logo { + color: #373B41; +} + +.logo-desc { + color: #e4e4e4; +} + +.result-headers span { + color: #555; +} + +.indexcommand { + background-color: #eaeaea; + color: #333; } .function { @@ -74,11 +109,30 @@ a:hover { background-color: #ddd; } -#buttonpanel div .ui-state-default { - background-color: #ddd; +#logo { + font-family: "Helvetica Neue", "Helvetica"; + font-weight: 300; + font-size: 36px; + color: #eee; + padding: 20px; + margin: 0; + display: inline-block; } -#buttonpanel div .ui-state-active { - background-color: #aaa; +#frontsearch, #search { + border: 1px solid #999; + color: #444; } +#frontsearch:focus, #search:focus { + border: 1px solid #85678F; +} + +.thicken { + font-weight: 400; +} + +#outer_disqus_thread { + background-color: #535353; + color: #eee; +} diff --git a/html/docs.gl.search.js b/html/docs.gl.search.js index 66f1177d..5dc81894 100644 --- a/html/docs.gl.search.js +++ b/html/docs.gl.search.js @@ -2,5 +2,6 @@ $(function() { // This file is loaded asynchronously. Now that it's loaded, reset the autocomplete source. - $("#search").autocomplete( "option", "source", search_versions[$("#search_versions").val()] ); + $('#search').autocomplete(); + $("#search").autocomplete( "option", "source", search_versions["all"] ); }); \ No newline at end of file diff --git a/html/header.html b/html/header.html index 26d9ef5e..bc847042 100644 --- a/html/header.html +++ b/html/header.html @@ -1,51 +1,57 @@ - -{$command} - {$api_name} {$command_major_version} - docs.gl + + {$command} - {$api_name} {$command_major_version} - docs.gl - - - - - - - + + + + + + + - + - - + + - - + + + - - - -
-
- -
API:
-
- -
- - - -
- -
-
{$command_versions}
-

{$command}

+
+ +
+
+

docs.GL

+ + +
+
+
+ +
+
+
+ +
+ +
+ + +
+
    {$api_commands}
+
    {$glsl_api_commands}
+ +
+ +
+
{$command_versions}
+

{$command}

diff --git a/html/index.html b/html/index.html index 511a07a4..f37d160e 100644 --- a/html/index.html +++ b/html/index.html @@ -1,192 +1,239 @@ - -docs.gl - - -{$jquery} - -{$jqueryui} - - - - - - - - + + + + + + + -
about docs.gl
-
-
- - -OpenGL API Documentation

-
-
- OpenGL ES
- - - -
-
- OpenGL
- - - - - - - - - - - +
-
-
-
- GLSL ES
- - - +
+
+

docs.GL

+

OpenGL API Documentation

+ +
-
- GLSL
- - - - - - - +
+
+
+ + +
+
-
-
- +
+ Method + Available in +
-
- -
-
Type the name of a GL or GLSL command.
-
-
{$commandlist}
-
- +
{$commandlist}
- \ No newline at end of file +