[m-rev.] for post-commit review: add glfw binding to extras

Ian MacLarty maclarty at csse.unimelb.edu.au
Mon Mar 26 15:03:32 AEDT 2012


On Mon, Mar 26, 2012 at 2:23 PM, Julien Fischer
<juliensf at csse.unimelb.edu.au> wrote:
>
> On Mon, 26 Mar 2012, Ian MacLarty wrote:
>
>> On Mon, Mar 26, 2012 at 1:04 AM, Julien Fischer
>> <juliensf at csse.unimelb.edu.au> wrote:
>>>
>>>
>>> I will add this to the NEWS file etc after I have dealt with
>>> any review comments.
>>>
>>> -------------------------------
>>>
>>> For post-commit review by Ian.
>>>
>> ...
>>>
>>> Index: extras/graphics/mercury_glfw/README
>>> ===================================================================
>>> RCS file: extras/graphics/mercury_glfw/README
>>> diff -N extras/graphics/mercury_glfw/README
>>> --- /dev/null   1 Jan 1970 00:00:00 -0000
>>> +++ extras/graphics/mercury_glfw/README 25 Mar 2012 13:50:07 -0000
>>> @@ -0,0 +1,43 @@
>>> +This directory contains the package `mercury_glfw', which is a Mercury
>>> binding
>>> +to the GLFW (See: <http://www.glfw.org>).
>>> +
>>> +Building the binding
>>> +====================
>>> +
>>> +(1) Fill in the system-specific information for your GLFW installation
>>> +    in the file GLFW.options.
>>> +
>>> +(2) Build and install using the following command:
>>> +
>>> +    $ mmc --make libmercury_glfw.install
>>> +
>>> +
>>> +Overview of the binding
>>> +=======================
>>> +
>>> +The Mercury GLFW binding provides access to  all of version 2.7 of GLFW
>>> API
>>> +with the exception of:
>>> +
>>> +   * the GLFW thread routines                   (use Mercury threads
>>> instead)
>>> +   * the image and texture loading routines     (deprecated)
>>> +   * the routines for handling OpenGL extensions
>>> +
>>> +The mapping between GLFW functions and the corresponding Mercury
>>> predicates
>>> +in the binding is straightforward, for example:
>>> +
>>> +   C                                    Mercury
>>> +   ---------                            -------
>>> +   glfwInit()                           glfw.init/2
>>> +   glfwOpenWindow()                     glfw.open_window/11
>>> +   glfwSetWindowRefreshCallback()
>>> glfw.set_window_refresh_callback/3
>>> +   glfwPollEvents()                     glfw.poll_events/2
>>> +
>>> +Unless otherwise noted, you may assume the specified given in the GLFW
>>
>>
>> s/specified/specification/
>
>
> Fixed -- thanks for that.
>

I think I found another problem.  You bind GLFW_MOUSE_BUTTON_LEFT and
GLFW_MOUSE_BUTTON_1 to separate Mercury enumeration constants, but in
C they have the same value (see page 27 of the glfw manual).  Isn't
that going to cause problems?

Ian.

--------------------------------------------------------------------------
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