summaryrefslogtreecommitdiffstats
path: root/o3d/samples/o3d-webgl-samples
diff options
context:
space:
mode:
authorluchen@google.com <luchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-27 21:56:11 +0000
committerluchen@google.com <luchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-27 21:56:11 +0000
commit1f84ed4f9d0cc61b4d77cbb1a0101d76a569b019 (patch)
treedc8d18aa81dbc6313fa79937e3e82e0b78bb8277 /o3d/samples/o3d-webgl-samples
parent7c961878cf318a96534620c3a1563ec7fa095b73 (diff)
downloadchromium_src-1f84ed4f9d0cc61b4d77cbb1a0101d76a569b019.zip
chromium_src-1f84ed4f9d0cc61b4d77cbb1a0101d76a569b019.tar.gz
chromium_src-1f84ed4f9d0cc61b4d77cbb1a0101d76a569b019.tar.bz2
o3d-webgl: Adjusting Sampler to throw an error if client attempts to use BORDER as uv address mode (not supported in WebGL).
Review URL: http://codereview.chromium.org/3038014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/o3d-webgl-samples')
-rw-r--r--o3d/samples/o3d-webgl-samples/shadow-map.html8
-rw-r--r--o3d/samples/o3d-webgl-samples/texturesamplers.html8
2 files changed, 9 insertions, 7 deletions
diff --git a/o3d/samples/o3d-webgl-samples/shadow-map.html b/o3d/samples/o3d-webgl-samples/shadow-map.html
index 7940410..97defe2 100644
--- a/o3d/samples/o3d-webgl-samples/shadow-map.html
+++ b/o3d/samples/o3d-webgl-samples/shadow-map.html
@@ -260,9 +260,11 @@ function initMaterials() {
g_shadowSampler.minFilter = g_o3d.Sampler.POINT;
g_shadowSampler.magFilter = g_o3d.Sampler.POINT;
g_shadowSampler.mipFilter = g_o3d.Sampler.POINT;
- g_shadowSampler.addressModeU = g_o3d.Sampler.BORDER;
- g_shadowSampler.addressModeV = g_o3d.Sampler.BORDER;
- g_shadowSampler.borderColor = [1, 1, 1, 1];
+ // Note: The o3d-plugin used BORDER as address mode, but that is not available
+ // in WebGL so use WRAP instead.
+ g_shadowSampler.addressModeU = g_o3d.Sampler.WRAP;
+ g_shadowSampler.addressModeV = g_o3d.Sampler.WRAP;
+ //g_shadowSampler.borderColor = [1, 1, 1, 1];
}
diff --git a/o3d/samples/o3d-webgl-samples/texturesamplers.html b/o3d/samples/o3d-webgl-samples/texturesamplers.html
index 13fec25..bbf810e 100644
--- a/o3d/samples/o3d-webgl-samples/texturesamplers.html
+++ b/o3d/samples/o3d-webgl-samples/texturesamplers.html
@@ -185,10 +185,10 @@ function initStep2(clientElements) {
samplers[1].minFilter = g_o3d.Sampler.ANISOTROPIC;
samplers[1].maxAnisotropy = 4;
- // Uses BORDER addressing mode with a red border.
- samplers[2].addressModeU = g_o3d.Sampler.BORDER;
- samplers[2].addressModeV = g_o3d.Sampler.BORDER;
- samplers[2].borderColor = [1, 0, 0, 1];
+ // Note: BORDER addressing is not supported in WebGL.
+ //samplers[2].addressModeU = g_o3d.Sampler.BORDER;
+ //samplers[2].addressModeV = g_o3d.Sampler.BORDER;
+ //samplers[2].borderColor = [1, 0, 0, 1];
// Uses POINT sampling for minification.
samplers[3].addressModeU = g_o3d.Sampler.WRAP;