[m-rev.] diff/for review: additions and fixes for opengl binding

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Jan 19 13:53:31 AEDT 2005


On Wed, 19 Jan 2005, Ian MacLarty wrote:

> On Thu, Jan 13, 2005 at 06:52:46PM +1100, Julien Fischer wrote:
> >
> > Estimated hours taken: 11
> > Branches: main
> >
> > extras/graphics/mercury_opengl/mogl.m:
> > 	Add binding for 1d evaluators.  We provide both
> > 	a safe method (which tries to make sure that the
> > 	data map1 is called with is sensible) and an unsafe
> > 	method, which is pretty much a direct binding to
> > 	glMap1{fd} (and does no runtime error checking).
> >
>
> What is glMap1{fd}?  Is it a function?  Why the curly braces?

It's two functions, glMap1f and glMap1d.  They both do the
same thing, only one works with floats and one works with doubles.

>
> > +:- func make_curve(control_points_1d) = curve_points.
> > +
> > +	% This version performs a runtime check to make sure that
> > +	% the evaluator target is compatible with the control points
> > +	% supplied.
> > +	%
>
> Perhaps you should mention what happens if the runtime check fails, so the user
> can handle any exceptions gracefully.
>
Done.

> > +*/
> > +
> > +/*
> > +** The MOGL_make_ctrl_point_array() macro allocates an array large
> > +** enough to hold large enough to hold `size' control points of the
>
> You've repeated "large enough to hold" here.
>
Fixed.


> > +
> > +%------------------------------------------------------------------------------%
> > +%
> > +% Feedback.
> > +%
>
> I don't really get what this comment means.

It's a section heading.  Feedback is an opengl rendering mode.  The
procedure in this section is one of the ones used for controlling it.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list