summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-05-30 22:10:19 +0200
committerYorhel <git@yorhel.nl>2010-05-30 22:11:32 +0200
commit11911a6a5c2823eab167de05c117f96cb61e4589 (patch)
tree9f9696d897a470ac1a6604c837d4d5f196a6aeda
parent17427edd906b215216afa790547eb659dc8cc5aa (diff)
Fixed the specular lighting
Forgot to set the shinyness...
-rw-r--r--main.ml11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.ml b/main.ml
index dbbc3f7..7c3ce77 100644
--- a/main.ml
+++ b/main.ml
@@ -39,19 +39,20 @@ let _ =
(* Some nice articles about lighting:
* http://www.sjbaker.org/steve/omniv/opengl_lighting.html
- * http://www.spacesimulator.net/tut5_vectors_and_lighting.html *)
+ * http://www.spacesimulator.net/tut5_vectors_and_lighting.html
+ * http://www.falloutsoftware.com/tutorials/gl/gl8.htm *)
GlDraw.shade_model `smooth;
Gl.enable `light0;
GlLight.light 0 (`position (1.0, 1.0, 0.0, 1.0));
GlLight.light 0 (`ambient (0.0, 0.0, 0.0, 1.0));
GlLight.light 0 (`diffuse (0.8, 0.8, 0.8, 1.0));
- GlLight.light 0 (`specular (1.0, 1.0, 1.0, 1.0));
+ GlLight.light 0 (`specular (0.7, 0.7, 0.7, 1.0));
GlLight.light_model (`ambient (0.2, 0.2, 0.2, 1.0));
Gl.enable `color_material;
- (* This doesn't seem to do what I want...
GlLight.color_material ~face:`both `ambient_and_diffuse;
- GlLight.material ~face:`both (`specular (1.0, 1.0, 1.0, 0.3));
- GlLight.material ~face:`both (`emission (0.0, 0.0, 0.0, 0.3));*)
+ GlLight.material ~face:`both (`specular (1.0, 1.0, 1.0, 1.0));
+ GlLight.material ~face:`both (`shininess 50.0);
+ GlLight.material ~face:`both (`emission (0.0, 0.0, 0.0, 1.0));
Gl.enable `depth_test;
Gl.enable `cull_face;