Giter Site home page Giter Site logo

gltools's Introduction

What is this?

This is a stand alone package for GLTools. According to the OpenGL SuperBible, written by the author of GLTools:

GLTools began life in the third edition of this book. Over time it has grown and provides a lot of shortcuts and handy tools, much like the OpenGL utility library (GLU) used to. GLTools includes a 3D math library to manipulate matrices and vectors and relies on GLEW for full OpenGL 3.3 support of functions that generate and render some simple 3D objects and manage your view frustum, camera, and transformation matrices

GLTools is incredibly useful, however, it is a real pain to get set up under Linux. The makefiles provided with the companion source code for the book all rebuild GLTools from scratch and statically link it to the executable.

For this distribution, I removed the included copy of GLEW and wrote some CMake files to make it easier to use with your own programs.

The official repository is available at http://code.google.com/p/oglsuperbible5/

NOTE: I only tested the build process under Ubuntu 10.04, if there are any issues on other platforms, patches are appreciated.

COMPILATION AND INSTALLATION

List of packages needed for compilation on Ubuntu:

build-essential g++ cmake libx11-dev freeglut3-dev libglu1-mesa-dev libxcb1-dev libxext-dev libxxf86vm-dev libxi-dev libxmu-dev glew-utils libglew1.5-dev

To compile and install GLTools:

cd build
cmake ..
make
sudo make install
sudo ldconfig

By default, headers will be in /usr/local/include and libraries will be in /usr/local/lib

gltools's People

Contributors

hazimgazov avatar manbeardo 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gltools's Issues

some errors of making

ubuntu@ubuntu:~/Desktop/GLTools/build$ make
[ 8%] Building CXX object CMakeFiles/gltools-static.dir/src/GLTools.cpp.o
/home/ubuntu/Desktop/GLTools/src/GLTools.cpp: In function ‘GLbyte* gltReadBMPBits(const char*, int*, int*)’:
/home/ubuntu/Desktop/GLTools/src/GLTools.cpp:1060:10: error: cannot convert ‘bool’ to ‘GLbyte* {aka signed char*}’ in return
return false;
^~~~~
/home/ubuntu/Desktop/GLTools/src/GLTools.cpp:1072:10: error: cannot convert ‘bool’ to ‘GLbyte* {aka signed char*}’ in return
return false;
^~~~~
/home/ubuntu/Desktop/GLTools/src/GLTools.cpp: In function ‘GLuint gltLoadShaderTripletWithAttributes(const char*, const char*, const char*, ...)’:
/home/ubuntu/Desktop/GLTools/src/GLTools.cpp:1256:32: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(stderr, infoLog);
^
CMakeFiles/gltools-static.dir/build.make:110: recipe for target 'CMakeFiles/gltools-static.dir/src/GLTools.cpp.o' failed
make[2]: *** [CMakeFiles/gltools-static.dir/src/GLTools.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gltools-static.dir/all' failed
make[1]: *** [CMakeFiles/gltools-static.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

make fail for 'GL/glew' file not found

For MacOS, glew installed by brew the INCLUDE_DIRS should be "/opt/homebrew/include", this is a small tip

if(UNIX)
set ( INCLUDE_DIRS
"/usr/include"
"/usr/local/include"
"/usr/include"
"/opt/homebrew/include"
${INCLUDE_DIRS}
)
endif(UNIX)

Build instructions for macOS

Building on macOS is very similar; would be nice if it was included in the readme.

Prereqs:

  • xcode-select --install (this installs the xcode command line tools including compilers, libraries, etc).
  • brew install glew cmake (needed libraries not already in macOS)

Building and installing:

  • cd build
  • cmake ..
  • make
  • sudo make install
  • sudo update_dyld_shared_cache

GLEW header files not found in Ubuntu

If a user has manually built and installed GLEW from source, the default include path for the headers is
<glew.h>
but if the user has installed canonical's version of GLEW via aptitude, the default include path for the headers is
<GL/glew.h>
this does not cause GLTools to fail to build, but it does cause anything that #includes GLTools to fail to build.

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.