Skip to content

Commit

Permalink
Merge branch 'glsl' of https://github.com/BSVino/docs.gl into glsl
Browse files Browse the repository at this point in the history
  • Loading branch information
BSVino committed Jun 18, 2015
2 parents ca7e67e + f8a4e99 commit 825d2ff
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 46 deletions.
17 changes: 11 additions & 6 deletions compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,10 @@ def spew_category(name, commands, current_command, api):
latest_minor = version_option

toc_versions_options = ""
toc_versions_options_gl = ""
toc_versions_options_es = ""
toc_versions_options_sl = ""
toc_versions_options_el = ""
for version_option in all_versions:
if version_option[0:2] == "gl" and float(version_option[2:]) < 2.1:
continue
Expand All @@ -614,15 +618,16 @@ def spew_category(name, commands, current_command, api):
selected = " selected='selected'"

if version_option[:2] == 'gl':
toc_versions_options = toc_versions_options + "<option class='versions_option' value='" + version_option.replace(".", "") + "'" + selected + ">OpenGL " + version_option[2:] + "</option>"
toc_versions_options_gl = toc_versions_options_gl + "<option class='versions_option' value='" + version_option.replace(".", "") + "'" + selected + ">OpenGL " + version_option[2:] + "</option>"
elif version_option[:2] == 'es':
toc_versions_options = toc_versions_options + "<option class='versions_option' value='" + version_option.replace(".", "") + "'" + selected + ">OpenGL ES " + version_option[2:] + "</option>"
toc_versions_options_es = toc_versions_options_es + "<option class='versions_option' value='" + version_option.replace(".", "") + "'" + selected + ">OpenGL ES " + version_option[2:] + "</option>"
elif version_option[:2] == 'sl':
toc_versions_options = toc_versions_options + "<option class='versions_option' value='" + version_option.replace(".", "") + "'" + selected + ">GLSL " + version_option[2:] + "</option>"
toc_versions_options_sl = toc_versions_options_sl + "<option class='versions_option' value='" + version_option.replace(".", "") + "'" + selected + ">GLSL " + version_option[2:] + "</option>"
elif version_option[:2] == 'el':
toc_versions_options = toc_versions_options + "<option class='versions_option' value='" + version_option.replace(".", "") + "'" + selected + ">GLSL ES " + version_option[2:] + "</option>"


toc_versions_options_el = toc_versions_options_el + "<option class='versions_option' value='" + version_option.replace(".", "") + "'" + selected + ">GLSL ES " + version_option[2:] + "</option>"

#Place dropdown in desired order
toc_versions_options = toc_versions_options_gl + toc_versions_options_es + toc_versions_options_sl + toc_versions_options_el
header_for_version = header_for_version.replace("{$versions_options}", toc_versions_options)
header_for_version = header_for_version.replace("{$command_major_version}", version[2])

Expand Down
2 changes: 1 addition & 1 deletion html/copy/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
margin-left: auto;
margin-right: auto;
text-align: center;
display: inline-block;
display: block;
width: 800px;
}
</style>
Expand Down
33 changes: 28 additions & 5 deletions html/copy/docs.gl.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function gl_printable_name(name) {
return "GLSL 1.3";
if (name == "sl14")
return "GLSL 1.4";
if (name == "sh15")
if (name == "sl15")
return "GLSL 1.5";
if (name == "sl33")
return "GLSL 3.3";
Expand Down Expand Up @@ -240,9 +240,9 @@ $(function() {
search_fn = function(value) {
var version = 'all';

if (search_versions[version].indexOf(value) < 0)
return;

if (search_versions[version].indexOf(value) < 0){
return false;
}
var alias_api = version.substring(0, 2);
var alias = value;
var directory = version.substring(0, 3) + "/";
Expand All @@ -258,10 +258,33 @@ $(function() {
command_page = function_aliases[alias_api][alias]

window.location.href = window.base_directory + directory + command_page;
return true;
}


function hide_tooltip (){
$("#search").trigger('mouseout');
}

$( "#search_button" ).button().click(function(event) {
search_fn($("#search").val());
if ( search_fn($("#search").val()) == false){

$("#search").attr("title","");
$("#search").tooltip();
$("#search").tooltip( "enable" );
$("#search").tooltip({ content: "<span style='color:#ff5555' >Command Not Found</span>" });
$("#search").tooltip({ show: { duration: 100 } });
$("#search").tooltip({ hide: { duration: 1000 } });
$("#search").trigger('mouseenter');
setTimeout(hide_tooltip,800)
$("#search").tooltip({
close: function( event, ui ) {

$("#search").tooltip( "disable" );
}
});
}

});

$( "#search" ).autocomplete({
Expand Down
4 changes: 2 additions & 2 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@
$("#frontsearch").keyup(front_filter_fn);

$("#light-toggle").click(function() {
$("#pagestyle").attr("href", "../style_light.css");
$("#pagestyle").attr("href", "style_light.css");
$.cookie("pagestyle", "light", {path: '/'});
});

$("#dark-toggle").click(function() {
$("#pagestyle").attr("href", "../style_dark.css");
$("#pagestyle").attr("href", "style_dark.css");
$.cookie("pagestyle", "dark", {path: '/'});
});

Expand Down
27 changes: 0 additions & 27 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,6 @@ HTML minification and Unicode processing as well. It looks like this:
If you are running Windows, there are a build.bat and a build_full.bat for convenience. When
the script is done building, the completed site will be in a folder named `htdocs`.

####OpenGL Only

Build only the opengl docs with the following:

python compile.py --only-gl

The `--full` parameter is still available as follow:

python compile.py --full --only-gl

When the script is done building, the completed site will be in a folder named `htdocs_gl`.

####GLSL Only

Build the only the GLSL docs with the following:

python compile.py --only-glsl

The `--full` parameter is still available as follow:

python compile.py --full --only-glsl

When the script is done building, the completed site will be in a folder named `htdocs_glsl`.

File Structure
--------------

Expand Down Expand Up @@ -91,13 +67,10 @@ initially downloaded from Khronos. They could be reused for additional processin
To Do
-----

* GLSL functions
* Extensions
* Display a message if the user makes an invalid search
* Display on each page "Core in version/core since version" like the [OpenGL Wiki does](http://www.opengl.org/wiki/GlBindTexture)
* Integrate information from the [common mistakes](http://www.opengl.org/wiki/Common_Mistakes) file into the page for each command they pertain to
* Update each page with any information that may be in the spec but missing in the manual
* Download the entire site as a zip file
* Display on each page which commands are likely to cause a pipeline stall (eg glGet)

Thanks to the great people in Freenode ##opengl who provided me good feedback while I was
Expand Down
5 changes: 0 additions & 5 deletions todo.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
ToDo
-----


- Fix API selector bug (remembers the last setting even on different API page).
- Split GL and GLSL DropDown Selector.
- Sort DropDown list (push unavailables at the bottom)
- Figure out `Unknown node type: list` issue (also displayed in the official docs).
- Improve GLSL Category
- Add redirection for aliases

0 comments on commit 825d2ff

Please sign in to comment.