Code Monkey home page Code Monkey logo

davinci's Introduction

davinci

A lightweight 3D graphics library in C++ with object-oriented infrastructure modules making programming OpenGL and managing graphics resource much easier.

Prerequisites

  • You need any form of C++11 compiler and build tool CMake
  • You need glew a cross-platform library to expose OpenGL core and extension functionality.
  • You need freeglut to provide a simple cross-platform window system.
  • You need freetype to produce high-quality output (glyph images) of most vector and bitmap font formats. (optional, see step 2.1 on how to toggle it.)

Depending on your Linux distribution you can install these dependencies using yum or apt-get. Some of these packages might already be installed or might have slightly different names.

Type the following to install the dependencies using yum:

sudo yum install cmake.x86_64

Type the following to install the dependencies using apt-get:

sudo apt-get install cmake-curses-gui

Under Mac OS X these dependencies can be installed using HomeBrew:

brew cask install cmake (note that `brew install cmake` only includes the CLI version)
brew install glew
brew install freeglut

Compiling Source Code

Building from the source code through CMake is easy:

1. Create a build directory

        mkdir davinci/build
        cd davinci/build

I do recommend having separate build directory from the source directory, so that you won't accidentally checked in the temporary files generated during the build process.

2.1 Build through CMake CLI

        cmake ../path/to/davinci_source

In case cmake cannot find the dependencies, you can alway tell cmake where they can be found by defining the root of the library installation as follows

        cmake -DGLEW_ROOT_DIR="path/to/glew_root" 
              -DFREEGLUT_ROOT_DIR="path/to/freeglut_root"
              -DDAVINCI_ENABLE_TEXT_RENDERING="true"

              ../path/to/davinci_source

CMake would try it best to guess what is the most appropriate build system generator you need based on your machine OS, for example, Unix Makefile for linux OS, Visual Studio for Windows. If you don't like the default build system generator, you can overide it by passing additional cmake parameter -G"generator name" For example, on Windows with Visual Studio 2013 x64:

       cmake -G"Visual Studio 12 2013 Win64"

on Linux:

       cmake -G"Unix Makefiles"

Type cmake --help for more options.

2.2 Build through CMake GUI

Besides CLI tool, CMake also provides an user friendly GUI to configure your build. The following screen shot is an example of how to run and configure the cmake through its GUI on Windows machine. CMakeGUI In case CMake cannot find the aforementioned dependencies, you can manually specify the root of the installation of each library on the UI just like you can define the cmake variable through its CLI in step 2.1. Once the pathes are correctly set, hit Configure. If this is your first time to configure the project, you will be prompted to select appropriate generator for this project. Click Generate to create makefile or Visual Studio sln file based on your selection in the last step.

3 Launch build system generator

Lastly, navigate to the build directory and build the project using

    make

or launch Visual Studio.

License

MIT

davinci's People

Contributors

stonexjr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.