[m-rev.] diff: glfw binding stuff

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Mar 26 15:51:09 AEDT 2012


Fix a problem with the GLFW binding.

Announce the binding.

extras/graphics/mercury_glfw/glfw.m:
 	Address a review comment from Ian: remove equivalent buttons
 	from the mouse_button/0 type.
NEWS:
 	Announce the GLFW binding.

extras/graphics/mercury_glfw/GLFW.options:
 	Provide flags for linking on Linux.

Julien.

Index: NEWS
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/NEWS,v
retrieving revision 1.605
diff -u -r1.605 NEWS
--- NEWS	4 Mar 2012 15:01:02 -0000	1.605
+++ NEWS	26 Mar 2012 04:43:07 -0000
@@ -16,6 +16,10 @@
  * We have added versions of the operations in the math module that omit the
    domain checks.

+Changes to the extras distribution:
+
+* We have added a binding to the GLFW library.
+

  NEWS for Mercury 11.07.1
  ------------------------
Index: extras/graphics/mercury_glfw/GLFW.options
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/extras/graphics/mercury_glfw/GLFW.options,v
retrieving revision 1.1
diff -u -r1.1 GLFW.options
--- extras/graphics/mercury_glfw/GLFW.options	25 Mar 2012 14:05:56 -0000	1.1
+++ extras/graphics/mercury_glfw/GLFW.options	26 Mar 2012 04:43:07 -0000
@@ -7,6 +7,12 @@

  # What flags do we need to pass the Mercury compiler in order to compile
  # against glfw?
-# (The following are for the Cocoa port of GLFW on Mac OS X.)
+
+# For Linux -- if linking statically you may also need to include an
+# assortment of X libraries.
+#
+#GLFW_MCFLAGS = -lglfw -lGLU -lGL
+
+# For Mac OS X and the Cocoa port of GLFW.
  #
  GLFW_MCFLAGS=-lglfw --framework Cocoa --framework OpenGL
Index: extras/graphics/mercury_glfw/glfw.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/extras/graphics/mercury_glfw/glfw.m,v
retrieving revision 1.1
diff -u -r1.1 glfw.m
--- extras/graphics/mercury_glfw/glfw.m	25 Mar 2012 14:05:56 -0000	1.1
+++ extras/graphics/mercury_glfw/glfw.m	26 Mar 2012 04:43:07 -0000
@@ -301,12 +301,9 @@
  :- pred glfw.get_key(key::in, key_state::out, io::di, io::uo) is det.

  :- type mouse_button
-    --->    mouse_button_left
-    ;       mouse_button_right
-    ;       mouse_button_middle
-    ;       mouse_button_1
-    ;       mouse_button_2
-    ;       mouse_button_3
+    --->    mouse_button_left       % Button 1.
+    ;       mouse_button_right      % Button 2.
+    ;       mouse_button_middle     % Button 3.
      ;       mouse_button_4
      ;       mouse_button_5
      ;       mouse_button_6
@@ -1180,9 +1177,6 @@
      mouse_button_left   - "GLFW_MOUSE_BUTTON_LEFT",
      mouse_button_right  - "GLFW_MOUSE_BUTTON_RIGHT",
      mouse_button_middle - "GLFW_MOUSE_BUTTON_MIDDLE",
-    mouse_button_1      - "GLFW_MOUSE_BUTTON_1",
-    mouse_button_2      - "GLFW_MOUSE_BUTTON_2",
-    mouse_button_3      - "GLFW_MOUSE_BUTTON_3",
      mouse_button_4      - "GLFW_MOUSE_BUTTON_4",
      mouse_button_5      - "GLFW_MOUSE_BUTTON_5",
      mouse_button_6      - "GLFW_MOUSE_BUTTON_6",

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list