Skip to content

Commit

Permalink
Merge branch 'pr/76'
Browse files Browse the repository at this point in the history
  • Loading branch information
benvanik committed Sep 7, 2015
2 parents 73423ce + 321abd0 commit 588abb1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 13 deletions.
3 changes: 1 addition & 2 deletions core/host/CaptureContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,9 @@
'OES_element_index_uint',
'EXT_texture_filter_anisotropic',
'EXT_shader_texture_lod',
'OES_depth_texture',
'WEBGL_depth_texture',
'WEBGL_compressed_texture_s3tc',
'MOZ_WEBGL_compressed_texture_s3tc',
'WEBKIT_WEBGL_compressed_texture_s3tc'
];
for (var n = 0, l = validExts.length; n < l; n++) {
validExts.push('MOZ_' + validExts[n]);
Expand Down
12 changes: 6 additions & 6 deletions core/ui/gli.css
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ canvas.frame-item-preview
.timeline-key-name
{
float: left;
font-family: Tahoma, san-serif;
font-family: Tahoma, sans-serif;
font-size: 12px;
}

Expand All @@ -801,7 +801,7 @@ a.timeline-enable-link, a.timeline-enable-link:hover
cursor: pointer;
text-decoration: underline;
color: #3875D7;
font-family: Tahoma, san-serif;
font-family: Tahoma, sans-serif;
font-size: 12px;
padding: 3px !important;
}
Expand All @@ -813,7 +813,7 @@ a.timeline-enable-link, a.timeline-enable-link:hover
background-color: #DDDDDD;
border-bottom: 1px solid #9F9F9F;
color: black;
font-family: Tahoma, san-serif;
font-family: Tahoma, sans-serif;
font-size: 13px;
-webkit-user-select: none;
-moz-user-select: none;
Expand Down Expand Up @@ -1320,7 +1320,7 @@ a.timeline-enable-link, a.timeline-enable-link:hover
background-color: #DDDDDD;
border-bottom: 1px solid #9F9F9F;
color: black;
font-family: Tahoma, san-serif;
font-family: Tahoma, sans-serif;
font-size: 13px;
-webkit-user-select: none;
-moz-user-select: none;
Expand Down Expand Up @@ -1442,7 +1442,7 @@ a.timeline-enable-link, a.timeline-enable-link:hover
{
float: left;
width: 90px;
font-family: Tahoma, san-serif;
font-family: Tahoma, sans-serif;
font-size: 13px;
color: Black;
}
Expand All @@ -1466,7 +1466,7 @@ a.timeline-enable-link, a.timeline-enable-link:hover
.pixelhistory-blending
{
float: left;
font-family: Tahoma, san-serif;
font-family: Tahoma, sans-serif;
font-size: 13px;
color: Black;
padding-top: 46px !important;
Expand Down
55 changes: 50 additions & 5 deletions core/ui/tabs/textures/TextureView.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,59 @@
}
break;
case gl.UNSIGNED_SHORT_5_6_5:
console.log("todo: UNSIGNED_SHORT_5_6_5");
if (format == gl.RGB) {
var strideDiff = (width * 4) % unpackAlignment, x, y, binval;
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++, sn++, dn += 4) {
binval = source[sn];
imageData.data[dn + 0] = binval >> 11;
imageData.data[dn + 1] = (binval >> 5) & 63;
imageData.data[dn + 2] = binval & 31;
imageData.data[dn + 3] = 255;
}
sn += strideDiff;
}
} else {
console.log("unsupported texture format");
return null;
}
return null;
case gl.UNSIGNED_SHORT_4_4_4_4:
console.log("todo: UNSIGNED_SHORT_4_4_4_4");
return null;
if (format == gl.RGBA) {
var strideDiff = (width * 4) % unpackAlignment, x, y, binval;
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++, sn++, dn += 4) {
binval = source[sn];
imageData.data[dn + 0] = binval >> 12;
imageData.data[dn + 1] = (binval >> 8) & 15;
imageData.data[dn + 2] = (binval >> 4) & 15;
imageData.data[dn + 3] = binval & 15;
}
sn += strideDiff;
}
} else {
console.log("unsupported texture format");
return null;
}
break;
case gl.UNSIGNED_SHORT_5_5_5_1:
console.log("todo: UNSIGNED_SHORT_5_5_5_1");
return null;
if (format == gl.RGBA) {
var strideDiff = (width * 4) % unpackAlignment, x, y, binval;
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++, sn++, dn += 4) {
binval = source[sn];
imageData.data[dn + 0] = binval >> 11;
imageData.data[dn + 1] = (binval >> 6) & 31;
imageData.data[dn + 2] = (binval >> 1) & 31;
imageData.data[dn + 3] = binval & 1;
}
sn += strideDiff;
}
} else {
console.log("unsupported texture format");
return null;
}
break;
case gl.FLOAT:
switch (format) {
case gl.ALPHA:
Expand Down

0 comments on commit 588abb1

Please sign in to comment.