Permalink
Browse files

renaming stuff

  • Loading branch information...
geoffroy
geoffroy committed Jun 24, 2011
1 parent 8042898 commit 4abd99d254f662ae81d291c777f7f0a24acd4f81
Showing with 6 additions and 4 deletions.
  1. +2 −2 src/engine/engine.opa
  2. +4 −2 src/engine/objects.opa
View
@@ -178,12 +178,12 @@ drawScene_for_a_viewport(eng, who, viewport, camera_setting : mat4, scene, mode)
do Webgl.uniform1i(gl, shaderProgram.useLightingUniform, 1); // 1 = true
Webgl.uniform3f(gl, shaderProgram.lightingDirectionUniform, 0.85, 0.8, 0.75)
| _ -> void end;
- List.iter((object -> display(eng, pMatrix, mvMatrix, object, false)), scene)
+ List.iter((object -> display_pickable(eng, pMatrix, mvMatrix, object, false)), scene)
| {pick} ->
do Webgl.bindFramebuffer(gl, Webgl.FRAMEBUFFER(gl), Option.some(eng.framePickBuffer));
do Webgl.clear(gl, Webgl.GLbitfield_OR(Webgl.COLOR_BUFFER_BIT(gl), Webgl.DEPTH_BUFFER_BIT(gl)));
do Webgl.uniform1i(gl, shaderProgram.useLightingUniform, 0); // 0 = false;
- do List.iter((object -> display(eng, pMatrix, mvMatrix, object, true)), scene);
+ do List.iter((object -> display_pickable(eng, pMatrix, mvMatrix, object, true)), scene);
void
end ;
View
@@ -2,7 +2,7 @@
type engine.color = ColorFloat.color;
type engine.position = vec3;
-type object = {
+type object.pickable = {
vertexPositions: Webgl.WebGLBuffer;
itemSize: int;
numItems: int;
@@ -17,9 +17,11 @@ type object = {
numIndexs: int
}
+type object = object.pickable;
-display(eng, pMatrix, mvMatrix, object, overide_color_for_picking) =
+
+display_pickable(eng, pMatrix, mvMatrix, object, overide_color_for_picking) =
gl = eng.context; shaderProgram = eng.shaderProgram;
color =
if overide_color_for_picking then object.picking_color

0 comments on commit 4abd99d

Please sign in to comment.