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

Ian MacLarty maclarty at cs.mu.OZ.AU
Wed Jan 19 01:57:22 AEDT 2005


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?

> +:- 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.

> +*/
> +
> +/*
> +** 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.

> +
> +%------------------------------------------------------------------------------%
> +%
> +% Feedback.
> +%

I don't really get what this comment means.

> +
> +:- pragma foreign_proc("C",
> +	pass_through(Token::in, IO0::di, IO::uo),
> +	[will_not_call_mercury, promise_pure],
> +"
> +	glPassThrough((GLfloat) Token);
> +	IO = IO0;
> +").
> 

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