Skip to content

Commit

Permalink
When changing between GL and GLES, close and open the menus to reset …
Browse files Browse the repository at this point in the history
…the heights.
  • Loading branch information
BSVino committed Aug 15, 2014
1 parent 3626bda commit 5d14cfa
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions html/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,35 @@
return "OpenGL X";
}

window.last_gl_version = ("{$current_api}").substring(0, 2);

function set_api_version(version) {
$( "#opengl_name" ).text(gl_printable_name(version));

$(".category").addClass("disabled");
$(".command").addClass("disabled");
$("." + version).removeClass("disabled");

// Remove functions from GL that ES doesn't have and vice versa.
/*$(".command").each(function() {
$(this).addClass("hidden");
if (window.last_gl_version != version.substring(0, 2))
{
// Remove functions from GL that ES doesn't have and vice versa.
$(".command").each(function() {
$(this).addClass("hidden");

var classList = $(this).attr('class').split(/\s+/);
for (var i = 0; i < classList.length; i++) {
if (classList[i].substring(0, 2) === version.substring(0, 2)) {
$(this).removeClass("hidden");
break;
var classList = $(this).attr('class').split(/\s+/);
for (var i = 0; i < classList.length; i++) {
if (classList[i].substring(0, 2) === version.substring(0, 2)) {
$(this).removeClass("hidden");
break;
}
}
}
});
$(".category").each(function() {
// Fix the different sizes
});*/
});

$("span.bonsai_inner").trigger('click');
$("span.bonsai_inner").trigger('click');

window.last_gl_version = version.substring(0, 2);
}
}

$(function() {
Expand Down

0 comments on commit 5d14cfa

Please sign in to comment.