Code Monkey home page Code Monkey logo

glextrusion's Introduction

GLE - The GL Extrusion Library

This git repo contains an update to the very old (1991-2001) GLE library, which is still available from the old website. That original website is mirrored here, in the doc/html directory.

This update is a snapshot of the final version 3.1.0 of the codebase, and includes work from Dave Richards, providing a MSWindows-friendly C++ wrapper. Dave's work is in the cgle-c++ directory.

GLE

GLE is a library package of C functions that draw extruded surfaces, including surfaces of revolution, sweeps, tubes, polycones, polycylinders and helicoids. Generically, the extruded surface is specified with a 2D polyline that is extruded along a 3D path. A local coordinate system allows for additional flexibility in the primitives drawn. Extrusions may be texture mapped in a variety of ways. The GLE library generates 3D triangle coordinates, lighting normal vectors and texture coordinates as output. GLE uses the GL or OpenGL(R) API's to perform the actual rendering. The demos use GLUT and require GLUT to be installed.

img img img

Obtaining OpenGL

OpenGL is available on UNIX, Linux, Mac and Windows. Find more about OpenGL at https://www.opengl.org/

Obtaining GLUT

The demos require that the GLUT windowing and utility library be installed. Most OpenGL distributions come with GLUT (I think).

On Linux/Debian

On modern Linux systems, skip the above, and instead, just say:

sudo apt-get install libgle3-dev

This will give you everything in this git repo, precompiled. If you want to compile from source, you will need this:

apt-get install libgl1-mesa-dev libxmu-dev libxi-dev freeglut3-dev

img img

Compiling

GLE uses the standard GNU automake/autoconf build process, and thus should be portable to essentially all computing platforms. At the command line simply type ./configure to set things up for your CPU & operating system. Then run make to compile. Finally, cd to the examples directory, and run the script rundemo to launch each of the demos in order (from most basic, to advanced). Use the left mouse button to move, the middle mouse button to access the pop-down menu.

If configure fails, its probably because some library or another is missing. Look at the file 'config.log' to see what actually went wrong. In particular, pay attention to the short program at the end: trying to compile it by hand will give you a good idea on why it failed.

Flags that can be supplied to ./configure:

--enable-lenient-tess If you have a tesselator that is happy with anything, including degenerate points, colinear segments, etc. then define this. Otherwise, don't specify this flag. Setting this flag provides a minor performance improvement. I beleive that the stock SGI tesselator is "lenient", despite explicit disclaimers in the documentation. (circa 1995). Early versions of the MesaGL tesselator are not at all forgiving of degenerate points. This resulted in frequent crashes and/or hangs. (circa 1997-2000). Recent versions (as of 2001) seem to work fine.

--disable-auto-texture Disable texture mapping code. Disabling texture mapping may provide a very minor performance improvement.

--enable-irisgl Compile for old IrisGL/GL-3.2 API. This used to work, but hasn't been tested in a long time.

--enable-debug Will compile sources so printf routines will be called instead of OpenGL routines. Warning: this will generate a lot of output!

Website Mirror

More information about building, as well as this package, can be found in the mirror of the original website, in the doc/html directory.

img img

RedHat RPM's

RedHat RPM's can be built using the gle.spec file.

Python, SWIG

Python bindings for gle can be found in the /swig directory. Be sure to read the readme.

Compiling for Windows

To compile with Visual C++, just do the following:

cd src
cl -c -DWIN32 -DOPENGL_10=1 *.c
lib -out:gle.lib *.obj

Alternately, there are a set of Microsoft Visual Studio Project files in the directory ms-visual-c that should do the same thing.

Running

Some of the example programs will hang or crash when run on older (pre-2001) versions of MesaGL/Linux. This was due to bugs in the MesaGL tesellator. Newer versions should work fine.

glextrusion's People

Contributors

imgbotapp avatar jaqx0r avatar linas avatar s172262 avatar yoshikawa-hiroyuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

glextrusion's Issues

Makefile.am: required file `./README' not found

$autoreconf -vi
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal 
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy
glibtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
glibtoolize: and rerunning glibtoolize and aclocal.
glibtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoheader
autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader: 
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a template without
autoheader: WARNING: `acconfig.h':
autoheader: 
autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader: 		[Define if a function `main' is needed.])
autoheader: 
autoheader: WARNING: More sophisticated templates can also be produced, see the
autoheader: WARNING: documentation.
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:27: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:27: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:33: installing './compile'
Makefile.am: error: required file './README' not found
examples/Makefile.am: installing './depcomp'
src/Makefile.am:53: warning: 'CFLAGS' is a user variable, you should not override it;
src/Makefile.am:53: use 'AM_CFLAGS' instead
autoreconf: automake failed with exit status: 1

There are several methods to resolve. See https://stackoverflow.com/questions/15013672/use-autotools-with-readme-md

Could you release a new version please?

Hi! I'm the Debian package maintainer and having some trouble with the old autoconf files against the current Debian autoconf tool versions. I see you fixed all these problems a few years back.

I'm attempting to roll the patches into the Debian package on top of 3.1.0, but it'd be very helpful if you could tag and release a new version with all the changes since 3.1.0.

Thanks in advance!

`src/Makefile.am` is missing `LIBADD` for dependent libraries

configure.ac checks for and appends required libraries to the @X_LIBS@ variable, and then uses that in examples/Makefile.am's LDADD, which is great for compiling the examples in-project.

But the generated libgle.so.3.1.0 does not link with @X_LIBS@ and so ldd src/.libs/libgle.so.3.1.0 is missing dependency information on libGL, libGLU, libglut, etc.

This manifests as link-time errors:

gcc -o test test.c -lgle:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libgle.so: undefined reference to `gluNewTess'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libgle.so: undefined reference to `gluTessVertex'

(actual example code: https://salsa.debian.org/debian/gle/-/blob/debian/debian/tests/build and build log: https://salsa.debian.org/debian/gle/-/jobs/4572587 )

Putting all of @X_LIBS@ into src/Makefile.am's libgle_la_LIBADD is almost correct, except that configure.ac also inserts -lgle in X_LIBS.

X_LIBS="-lgle $X_LIBS -lXt -lX11"

I think a fix could be to stop inserting -lgle into X_LIBS, using X_LIBS to set libgle_la_LIBADD in src/Makefile.am, and inserting -lgle in only the examples/Makefile.am LIBADD variable.

Recent MacOSX doesn't have <malloc.h>.

Please use <stdlib.h> instead of <malloc.h> for MacOS.

ex_raw.c:20:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
         ^~~~~~~~~~
#include <malloc.h>
         ^~~~~~~~~~
ex_cut_round.c:23:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
         ^~~~~~~~~~
In file included from ex_alpha.c:52:
./ex_angle.c:21:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
         ^~~~~~~~~~
1 error generated.
1 error generated.
1 error generated.
make[1]: *** [ex_raw.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [ex_angle.lo] Error 1
make[1]: *** [ex_cut_round.lo] Error 1
1 error generated.
make[1]: *** [ex_alpha.lo] Error 1
make: *** [install-recursive] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.