for review: add mercury_opengl library

Tyson Dowd trd at cs.mu.OZ.AU
Mon Feb 16 18:29:03 AEDT 1998


Hi,

Tom, can you review this?

(I've removed some of the larger source files from this diff, since I
haven't changed a line of them).

===================================================================


Estimated hours taken: 3

Add mercury_opengl as a library.

extras/graphics/mercury_opengl/COPYING.LIB:
extras/graphics/mercury_opengl/HOWTO:
extras/graphics/mercury_opengl/LICENSE.TK:
extras/graphics/mercury_opengl/LICENSE.TOGL:
extras/graphics/mercury_opengl/Mmakefile:
extras/graphics/mercury_opengl/README:
extras/graphics/mercury_opengl/mercury_opengl.m:
extras/graphics/mercury_opengl/mglu.m:
extras/graphics/mercury_opengl/mogl.m:
extras/graphics/mercury_opengl/mtogl.m:
extras/graphics/mercury_opengl/tkConsole.c:
extras/graphics/mercury_opengl/tkFont.h:
extras/graphics/mercury_opengl/tkInt4.0.h:
extras/graphics/mercury_opengl/tkInt4.1.h:
extras/graphics/mercury_opengl/tkInt4.2.h:
extras/graphics/mercury_opengl/tkInt8.0.h:
extras/graphics/mercury_opengl/tkInt8.0p2.h:
extras/graphics/mercury_opengl/tkPort.h:
extras/graphics/mercury_opengl/tkWin.h:
extras/graphics/mercury_opengl/tkWinInt.h:
extras/graphics/mercury_opengl/tkWinPort.h:
extras/graphics/mercury_opengl/togl.c:
extras/graphics/mercury_opengl/togl.h:
	Same old .m files (except mercury_opengl.m), new Mmakefile,
	new LICENSEs, updated version of Togl.



New File: extras/graphics/mercury_opengl/HOWTO
===================================================================

Using mercury_opengl is not all that different to using a C interface to
OpenGL.  See the samples for example code, and the interfaces of
the modules.  Note that we don't consider these modules fully documented
in any way, but if you know OpenGL, you shouldn't have any problems.

You need to add some information to your Mmakefile to tell mmake
where the mercury_opengl library is, and to link with the
mercury_opengl, mercury_tcltk, tcl, tk, Mesa/GL and X libraries.

The following is an example. You may need to change the `tk8.0' and
`tcl8.0' if you are using a different version of Tcl/Tk, and don't
forget to change `some/directory' to the directory where this package
is installed.

	EXTRA_MLLIBS  = -ltk8.0 -ltcl8.0 -L/usr/X11R6/lib -lX11 -lXmu \
				-lXext -lm -ldl

	# Specify the location of the `mercury_tcltk' package.
	MERCURY_TCLTK_DIR  = some/directory/mercury_tcltk

	# Tell mmake to use the `mercury_tcltk' library.
	VPATH           = $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)
	MCFLAGS         = -I$(MERCURY_TCLTK_DIR) $(EXTRA_MCFLAGS)
	MLFLAGS         = -R$(MERCURY_TCLTK_DIR) $(EXTRA_MLFLAGS) \
			  -L$(MERCURY_TCLTK_DIR) 
	MLLIBS          = -lmercury_tk $(EXTRA_MLLIBS)
	C2INITFLAGS     = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init 

You can then use EXTRA_MCFLAGS, EXTRA_MLFLAGS, etc to set any other
options you need.


New File: extras/graphics/mercury_opengl/LICENSE.TK
===================================================================
This package was debianized by David Engel <david at debiang.org>
from sources obtained from ftp.sunlabs.com:/pub/tcl.

Copyright:

This software is copyrighted by the Regents of the University of
California, Sun Microsystems, Inc., and other parties.  The following
terms apply to all files associated with the software unless explicitly
disclaimed in individual files.

The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.

GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
in the software and related documentation as defined in the Federal 
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.

New File: extras/graphics/mercury_opengl/LICENSE.TOGL
===================================================================
This software is copyrighted by Brian Paul (brianp at ssec.wisc.edu)
and Benjamin Bederson (bederson at cs.unm.edu).  The following
terms apply to all files associated with the software unless explicitly
disclaimed in individual files.

The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.

RESTRICTED RIGHTS: Use, duplication or disclosure by the government
is subject to the restrictions as set forth in subparagraph (c) (1) (ii)
of the Rights in Technical Data and Computer Software Clause as DFARS
252.227-7013 and FAR 52.227-19.

New File: extras/graphics/mercury_opengl/Mmakefile
===================================================================

MAIN_TARGET = all

MLOBJS		= togl.pic_o 

# Specify the location of the `mercury_tcltk' package.
MERCURY_TCLTK_DIR 	= ../mercury_tcltk

# Tell mmake to use the `mercury_tcltk' library.
VPATH 		= $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)
MCFLAGS 	= -I$(MERCURY_TCLTK_DIR) $(EXTRA_MCFLAGS)
MLFLAGS 	= -R$(MERCURY_TCLTK_DIR) $(EXTRA_MLFLAGS) \
          	  -L$(MERCURY_TCLTK_DIR) 
MLFLAGS 	= $(EXTRA_MLFLAGS) 
MLLIBS 		= $(EXTRA_MLLIBS)
C2INITFLAGS 	= $(MERCURY_TCLTK_DIR)/mercury_tcltk.init 

# We need to also access mtcltk.h
MGNUCFLAGS	= -I$(MERCURY_TCLTK_DIR)

depend: mercury_opengl.depend

all: togl.pic_o libmercury_opengl 


New File: extras/graphics/mercury_opengl/README
===================================================================

This directory contains the package `mercury_opengl', which is a Mercury
binding for OpenGL, using tcl/tk.

You will need:
	- the Mercury system.
	- Tcl/Tk (Tk 4.0 or later).
	- the `mercury_tcltk' package.
	- an OpenGL implementation such as Mesa.

It contains the following modules:

	mglu.m		- provides Mercury bindings to the GLU library.
	mogl.m		- provides Mercury bindings to Open GL 1.1
	mtogl.m		- provides Mercury bindings to Togl, a
			  tcl/tk Open GL binding.
	
	togl.c, togl.h  - Togl 1.5 

	other .c and .h - Internals of Tk.
	files

See HOWTO for details on how to link the package in with your own
Mercury programs.

	The mercury_opengl package is free software, but is Copyright
	(C) 1997-1998 The University of Melbourne. It is distributed
	under the terms of the GNU Library General Public License.
	See the file COPYING.LIB for copying permission.

See LICENSE.TOGL to see the licensing conditions for Togl.

See LICENSE.TK to see the licensing conditions for Tk.


New File: extras/graphics/mercury_opengl/mercury_opengl.m
===================================================================
%-----------------------------------------------------------------------------%
% Copyright (C) 1997 The University of Melbourne.
% This file may only be copied under the terms of the GNU Library General
% Public License - see the file COPYING.LIB in the Mercury distribution.
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%

% mercury_opengl -- a Mercury binding for OpenGL.

:- module mercury_opengl.

:- import_module mglu, mogl, mtogl.



-- 
       Tyson Dowd           # There isn't any reason why Linux can't be
                            # implemented as an enterprise computing solution.
     trd at cs.mu.oz.au        # Find out what you've been missing while you've
http://www.cs.mu.oz.au/~trd # been rebooting Windows NT. -- InfoWorld, 1998.



More information about the developers mailing list