summaryrefslogtreecommitdiffstats
path: root/o3d/samples/picking.html
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/samples/picking.html')
-rw-r--r--o3d/samples/picking.html10
1 files changed, 4 insertions, 6 deletions
diff --git a/o3d/samples/picking.html b/o3d/samples/picking.html
index 24a652f..f4a73a0 100644
--- a/o3d/samples/picking.html
+++ b/o3d/samples/picking.html
@@ -294,12 +294,10 @@ function initStep2(clientElements) {
g_debugLine.setColor([0,1,0,1]);
// Create a material for highlighting.
- g_highlightMaterial = g_pack.createObject('Material');
- g_highlightMaterial.drawList = g_viewInfo.performanceDrawList;
- var effect = g_pack.createObject('Effect');
- o3djs.effect.loadEffect(effect, 'shaders/solid-color.shader');
- g_highlightMaterial.effect = effect;
- effect.createUniformParameters(g_highlightMaterial);
+ g_highlightMaterial = o3djs.material.createConstantMaterial(
+ g_pack,
+ g_viewInfo,
+ [1, 1, 1, 1]);
// Setup a state to bring the lines forward.
var state = g_pack.createObject('State');
state.getStateParam('PolygonOffset2').value = -1.0;