[m-rev.] for review: add is_list/4 and list_base/3 to opengl binding

Julien Fischer juliensf at students.cs.mu.OZ.AU
Wed Jan 14 17:15:53 AEDT 2004


Estimated hours taken: 0.5
Branches: main

extras/graphics/mercury_opengl/mogl.m:
	Add bindings for glIsList() and glListBase().

Julien.

Index: mogl.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_opengl/mogl.m,v
retrieving revision 1.6
diff -u -r1.6 mogl.m
--- mogl.m	14 Jan 2004 06:01:12 -0000	1.6
+++ mogl.m	14 Jan 2004 06:06:41 -0000
@@ -638,6 +638,12 @@
 :- pred delete_lists(int, int, io, io).
 :- mode delete_lists(in, in, di, uo) is det.

+:- pred is_list(int, bool, io, io).
+:- mode is_list(in, out, di, uo) is det.
+
+:- pred list_base(int, io, io).
+:- mode list_base(in, di, uo) is det.
+
 %------------------------------------------------------------------------------%
 %
 % Flush and Finish.
@@ -2779,6 +2785,25 @@
 	[will_not_call_mercury, promise_pure],
 "
 	glDeleteLists((GLuint) N, (GLsizei) M);
 	IO = IO0;
 ").
+
+:- pragma foreign_proc("C",
+	is_list(L::in, R::out, IO0::di, IO::uo),
+	[may_call_mercury, promise_pure],
+"
+	if(glIsList((GLuint) L))
+		R = ML_bool_return_yes();
+	else
+		R = ML_bool_return_no();
+	IO = IO0;
+").
+
+:- pragma foreign_proc("C",
+	list_base(Base::in, IO0::di, IO::uo),
+	[will_not_call_mercury, promise_pure],
+"
+	glListBase((GLuint) Base);
+	IO = IO0;
+").


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