| 1 | {% extends "reports/base.html" %} |
| 2 | {% load report_tags %} |
| 3 | |
| 4 | {% block css %} |
| 5 | |
| 6 | .col { |
| 7 | float: left; |
| 8 | } |
| 9 | |
| 10 | .progress { |
| 11 | font-size: 10px; |
| 12 | font-weight: bold; |
| 13 | display: inline-block; |
| 14 | background: #f99; |
| 15 | width: 40px; |
| 16 | height: 13px; |
| 17 | } |
| 18 | .progress .bar { |
| 19 | display: inline-block; |
| 20 | position: absolute; |
| 21 | background: #3f3; |
| 22 | height: 13px; |
| 23 | z-index: 0; |
| 24 | } |
| 25 | |
| 26 | li:hover { |
| 27 | background: #ddd; |
| 28 | } |
| 29 | |
| 30 | ul { |
| 31 | list-style-type: none; |
| 32 | margin: 2px 10px 2px 0; |
| 33 | padding: 0; |
| 34 | } |
| 35 | |
| 36 | {% endblock %} |
| 37 | |
| 38 | {% block title %} |
| 39 | OpenGL capabilities database - index |
| 40 | {% endblock %} |
| 41 | |
| 42 | {% block heading %} |
| 43 | OpenGL capabilities database |
| 44 | {% endblock %} |
| 45 | |
| 46 | {% block content %} |
| 47 | |
| 48 | <script> |
| 49 | function sort_by_percent(ul) |
| 50 | { |
| 51 | var data = []; |
| 52 | var lis = ul.getElementsByTagName('li'); |
| 53 | for (var i = 0; i < lis.length; ++i) |
| 54 | data.push([+lis[i].getAttribute('data-supportedby'), lis[i].getAttribute('data-extname'), lis[i]]); |
| 55 | data.sort(function (a, b) { return b[0] - a[0] || (a[1] < b[1] ? -1 : b[1] < a[1] ? 1 : 0) }); |
| 56 | for (var i = 0; i < data.length; ++i) |
| 57 | ul.appendChild(data[i][2]); |
| 58 | } |
| 59 | |
| 60 | function sort_by_name(ul) |
| 61 | { |
| 62 | var data = []; |
| 63 | var lis = ul.getElementsByTagName('li'); |
| 64 | for (var i = 0; i < lis.length; ++i) |
| 65 | data.push([lis[i].getAttribute('data-extname'), lis[i]]); |
| 66 | data.sort(function (a, b) { return (a[0] < b[0] ? -1 : b[0] < a[0] ? 1 : 0) }); |
| 67 | for (var i = 0; i < data.length; ++i) |
| 68 | ul.appendChild(data[i][1]); |
| 69 | } |
| 70 | </script> |
| 71 | |
| 72 | <p>Based on data submitted by players of <a href="http://play0ad.com/">0 A.D.</a> |
| 73 | See the <a href="{% url userreport.views.index %}">index page</a> for more stuff. |
| 74 | Contact <a href="mailto:excors@gmail.com">Philip Taylor</a> for questions.</p> |
| 75 | |
| 76 | <p>Browse the data here, or download as <a href="{% url userreport.views.report_opengl_json %}">JSON</a> |
| 77 | (see <a href="{% url userreport.views.report_opengl_json_format %}">format description</a>). |
| 78 | Feel free to do whatever you want with the data.</p> |
| 79 | |
| 80 | <p>The listed extensions are based on the GL_EXTENSIONS string: |
| 81 | we don't show an extension as supported if it's not explicitly advertised, |
| 82 | even if GL_VERSION is a version where that extension was folded into |
| 83 | the main spec.</p> |
| 84 | |
| 85 | <p>The extension support percentages are based on the number of user/device/driver combinations, |
| 86 | from a total of {{ num_users }}. This is obviously hopelessly biased and unrepresentative |
| 87 | so don't read too much into the numbers.</p> |
| 88 | |
| 89 | <p>The listed device names are based on GL_RENDERER, with boring components stripped out. |
| 90 | Driver versions on Windows are determined from DLL versions; if we can't guess which is the |
| 91 | correct DLL then we try to list all the detectable DLLs. Driver versions on Linux are determined |
| 92 | from GL_VERSION, when it's encoded in there. |
| 93 | </p> |
| 94 | |
| 95 | <div class=col> |
| 96 | <h2>Extension support</h2> |
| 97 | Sort by |
| 98 | <a href="#" onclick="sort_by_percent(document.getElementById('extensions')); return false">% support</a> / |
| 99 | <a href="#" onclick="sort_by_name(document.getElementById('extensions')); return false">name</a>. |
| 100 | <ul id=extensions> |
| 101 | {% for ext in all_exts %} |
| 102 | <li data-supportedby={{ ext_devices|dictget:ext }} data-extname="{{ ext }}"> |
| 103 | <span class=progress title="Percentage of users with this extension"><span class=bar style="width:{% widthratio ext_devices|dictget:ext num_users 40 %}px">{% widthratio ext_devices|dictget:ext num_users 100 %}%</span></span> |
| 104 | (<a href="{{ ext|glext_spec_link }}" title="Link to specification">s</a>) |
| 105 | <a href="{% url userreport.views.report_opengl_feature ext %}">{{ ext }}</a> |
| 106 | {% if ext in ext_versions %}(~GL{{ ext_versions|dictget:ext }}){% endif %} |
| 107 | {% endfor %} |
| 108 | </ul> |
| 109 | </div> |
| 110 | |
| 111 | <div class=col> |
| 112 | <h2>Implementation limits</h2> |
| 113 | <ul> |
| 114 | {% for limit in all_limits %} |
| 115 | <li><a href="{% url userreport.views.report_opengl_feature limit %}">{{ limit|prettify_gl_title }}</a> |
| 116 | {% endfor %} |
| 117 | </ul> |
| 118 | </div> |
| 119 | |
| 120 | <div class=col> |
| 121 | <h2>Device details</h2> |
| 122 | <ul> |
| 123 | {% for device,users in all_devices|sorteditems %} |
| 124 | <li><a href="{% url userreport.views.report_opengl_device device %}">{{ device }}</a> {% if 0 %}({{ users }} users){% endif %} |
| 125 | {% endfor %} |
| 126 | </ul> |
| 127 | </div> |
| 128 | |
| 129 | {% endblock %} |