README
1
2Portability Libraries.
3======================
4 by Steve Baker.
5
6All the documentation and installation instructions
7are now online at:
8
9 http://plib.sourceforge.net
10
11They are also downloadable - along with example
12programs and demos from the same site.
13
14
15SUPPORT:
16
17Please don't email me (Steve Baker) directly - I
18get *WAY* too much mail as it is! Instead, please
19sign up to the PLIB user's mailing list. Instructions
20can be found here:
21
22 http://plib.sourceforge.net
23
24
25LICENSING:
26
27These libraries are offered as OpenSource freeware
28under the provisions of the GNU Library Public
29License (LGPL). Those terms and conditions are
30detailed in the file 'LICENSE' in this directory.
31
32I have added a short preamble to LGPL that removes
33no rights from ordinary users but offers special
34dispensation to allow PLIB to be used under certain
35commercial conditions (such as Games Consoles) where
36the constraints of LGPL are impossible to meet.
37
38| As a special exception Steve Baker gives permission to link these
39| libraries with proprietary software and distribute the resulting
40| executable without including that proprietary code in any distribution
41| as the LGPL would normally dictate.
42|
43| This exception is ONLY granted in the case of an embedded system in
44| which there is no possibility of an end user re-linking or recompiling
45| against new versions of this library that may appear in the future.
46
47
48REQUIREMENTS:
49
50In addition to the libraries that I provide, you
51will also need OpenGL (OpenGL 1.1 or later -
52Mesa 3.0 or later) and GLUT (The OpenGL utilities
53toolkit - version 3.7 or later) and a hardware 3D
54graphics accellerator that supports OpenGL.
55
56
57WHAT DO YOU GET?
58
59The following libraries are provided:
60
61JS -- A Joystick interface.
62PUI -- A simple GUI built on top of OpenGL.
63SG -- Some Standard Geometry functions (vector and
64 matrix math, spheres, boxes, frustra, etc)
65SL -- A Games-oriented Sound Library.
66FNT -- OpenGL texture-mapped font Library.
67PW -- A minimalist windowing library.
68PSL -- A C-like scripting language.
69SSG -- A Simple Scene Graph API built on top of OpenGL.
70NET -- Some Networking functions for games.
71UTIL-- Utilities - things that your OS would normally
72 handle - but these functions are portable.
73
74SSGAUX -- Some optional additional high level features for SSG
75PUIAUX -- Some optional additional high level features for PUI
76
77
78DIRECTORY STRUCTURE:
79
80PLIB expects to be installed in one standard place:
81
82 /usr/lib
83
84...with header files at:
85
86 /usr/include/plib
87
88
89PORTABILITY and DEPENDANCIES:
90
91Although all these libraries are designed to be easily
92portable (and more importantly so that programs using
93them can be UTTERLY portable), some of them have not
94yet been ported to all operating systems.
95
96JS -- Currently Linux/Windows/BSD only.
97
98UL -- Should be portable to POSIX-compliant
99 OS's ... and Windows.
100
101SG -- Totally portable, no dependancies.
102
103PUI -- Requires OpenGL also FNT and SG.
104 PUI also requires some kind of windowing
105 library - which could be PW - or GLUT,
106 freeglut, SDL, FLTK - or others.
107
108PSL -- Requires UL.
109
110PW -- Requires UL.
111
112NET -- Should be portable to POSIX-compliant
113 OS's.
114
115FNT and SSG -- Require OpenGL, SG and UL.
116
117SSGAUX -- Requires SSG - and hence OpenGL, SG and UL.
118PUIAUX -- Requires PUI - and hence FNT and SG.
119
120SL -- This has now been ported onto:
121
122 Linux
123 FreeBSD
124 OpenBSD
125 M$ Windows (NT,95,98 - so far)
126 MacOS
127 SGI IRIX
128 Sun Solaris
129 Any operating system that supports OSS (The
130 Open Sound System).
131
132 NOTE: SL has a subsidiary library 'SM' that
133 can be used to control the audio mixer - but
134 that is not portable beyond Linux. You might
135 get it to work under OSS-based sound systems
136 too. Don't use SM if you want to write portable
137 code.
138
139 No other requirements.
140
141
142AUX LIBRARIES AND TOOLS:
143
144The 'tools' directory contains a number of useful tools
145and utility programs that are either built using PLIB or
146which are specifically useful when writing PLIB programs.
147
148
149COMPILING/LINKING WITH PLIB
150
151In your source code, add any combination of:
152
153 #include <plib/ul.h>
154 #include <plib/js.h>
155 #include <plib/sg.h>
156 #include <plib/fnt.h>
157 #include <plib/pu.h>
158 #include <plib/ssg.h>
159 #include <plib/pw.h>
160 #include <plib/puAux.h>
161 #include <plib/psl.h>
162 #include <plib/sl.h>
163 #include <plib/net.h>
164 #include <plib/ssgAux.h>
165
166Add any of these to your link line:
167
168 -lplibjs -lplibssgaux -lplibssg -lplibsl -lplibpu
169 -lplibpuaux -lplibpw -lplibpsl -lplibfnt -lplibnet
170 -lplibsg -lplibul
171
172Under UNIX/Linux, you'll also need:
173
174 -lGLU -lGL -L/usr/X11/lib -lX11 -lXext -lXmu -lm
175
176...and perhaps a -l for whatever windowing library
177you're using - unless it's the built-in PW library.
178
179 Steve Baker.
180 <sjbaker1@airmail.net>
181 http://www.sjbaker.org
182
183
README.GLUT
1
2PUI no longer depends on GLUT or freeglut.
3
4
README.mac
1
2PLIB Project files for CodeWarrior
3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5NOTE from Steve:
6 It seems that the CodeWarrior project files for
7 PLIB are considerably larger than the entire source
8 distribution (450Kb!)
9
10 Hence, since Mac/CodeWarrior users are not exactly
11 commonplace, I'm not going to include the project
12 files into the distro and cause everyone else prolonged
13 download times.
14
15 I suggest you contact Darrell Walisser <dwaliss1@purdue.edu>
16 should you need to build PLIB in this setting.
17
18 Sorry!
19
20
README.win32
1
2PLIB for Windoze.
3~~~~~~~~~~~~~~~~~
4
5Let me first say that I (Steve Baker) don't own a copy
6of Windoze - so I have little or no ability to help
7Windoze owners with PLIB problems. It's especially
8important therefore that you direct problems and
9queries to the PLIB mailing lists. Subscription
10information is on the PLIB homepage:
11
12 http://plib.sourceforge.net
13
14
15CygWin:
16~~~~~~~
17The simplest way to build PLIB for Windoze is to
18use the CygWin compiler and toolset. Since that
19environment is pretty close to UNIX/Linux, the
20
21 ./configure
22 make
23 make install
24
25...mechanism works perfectly.
26
27
28MingW32:
29~~~~~~~~
30A couple of people have asked about doing a MingW32 port - but
31as far as I can tell, the "configure/make/make install" approach
32*should* work.
33
34
35Microsoft Visual C++:
36~~~~~~~~~~~~~~~~~~~~~
37All you need to do is open the workspace "plib.dsw" in MSVC++,
38select the "plib" project (using Set Active Project in the Project
39menu), and build it (using "Rebuild All" in the Build menu).
40
41In the examples folder, open the workspace "plib_examples.dsw".
42Each example has a seperate project in the workspace. Select
43the one you want and build it. Then you should be able to hit
44the Go icon on the toolbar and try it out.
45
46For your own application, please note that the plib workspace
47leaves all the necessary includes (*.h) and libraries (*.lib)
48in the plib root directory (same as workspace). The debug
49libraries are given a '_d' suffix. Where ever you put those
50files, make sure #include <plib/ul.h> works so your code is
51more portable.
52
53