Coder Social home page Coder Social logo

typhz / aprendaopengl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joeydevries/learnopengl

0.0 0.0 0.0 199.89 MB

Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com

Home Page: https://learnopengl.com

License: Other

Shell 0.01% C++ 52.57% C 45.21% Objective-C 0.07% C# 0.01% CMake 0.20% GLSL 1.93%

aprendaopengl's Introduction

learnopengl.com code repository

Contains code samples for all chapters of Learn OpenGL and https://learnopengl.com.

Windows building

All relevant libraries are found in /libs and all DLLs found in /dlls (pre-)compiled for Windows. The CMake script knows where to find the libraries so just run CMake script and generate project of choice.

Keep in mind the supplied libraries were generated with a specific compiler version which may or may not work on your system (generating a large batch of link errors). In that case it's advised to build the libraries yourself from the source.

Linux building

First make sure you have CMake, Git, and GCC by typing as root (sudo) apt-get install g++ cmake git and then get the required packages: Using root (sudo) and type apt-get install libsoil-dev libglm-dev libassimp-dev libglew-dev libglfw3-dev libxinerama-dev libxcursor-dev libxi-dev libfreetype-dev libgl1-mesa-dev xorg-dev .

Build through CMake-gui: The source directory is LearnOpenGL and specify the build directory as LearnOpenGL/build. Creating the build directory within LearnOpenGL is important for linking to the resource files (it also will be ignored by Git). Hit configure and specify your compiler files (Unix Makefiles are recommended), resolve any missing directories or libraries, and then hit generate. Navigate to the build directory (cd LearnOpenGL/build) and type make in the terminal. This should generate the executables in the respective chapter folders.

Build through Cmake command line:

cd /path/to/LearnOpenGL
mkdir build && cd build
cmake ..
cmake --build .

Note that CodeBlocks or other IDEs may have issues running the programs due to problems finding the shader and resource files, however it should still be able to generate the executables. To work around this problem it is possible to set an environment variable to tell the tutorials where the resource files can be found. The environment variable is named LOGL_ROOT_PATH and may be set to the path to the root of the LearnOpenGL directory tree. For example:

`export LOGL_ROOT_PATH=/home/user/tutorials/LearnOpenGL`

Running ls $LOGL_ROOT_PATH should list, among other things, this README file and the resources directory.

Mac OS X building

Building on Mac OS X is fairly simple:

brew install cmake assimp glm glfw freetype
cmake -S . -B build
cmake --build build -j$(sysctl -n hw.logicalcpu)

Create Xcode project on Mac platform

Thanks @caochao: After cloning the repo, go to the root path of the repo, and run the command below:

mkdir xcode
cd xcode
cmake -G Xcode ..

Glitter

Polytonic created a project called Glitter that is a dead-simple boilerplate for OpenGL. Everything you need to run a single LearnOpenGL Project (including all libraries) and just that; nothing more. Perfect if you want to follow along with the chapters, without the hassle of having to manually compile and link all third party libraries!

aprendaopengl's People

Contributors

joeydevries avatar jsoref avatar jonassorgenfrei avatar zmertens avatar rbarkmore avatar pattakosn avatar alexpanter avatar kr4ftw0rk avatar ibbles avatar github-jane-doe avatar agnat avatar linesight avatar domgries avatar nicholasblaskey avatar shivmsit avatar ankitsinghkushwah avatar dotlive avatar daeunsong avatar 64 avatar lpapp-foundry avatar mahiuchun avatar haraldreingruber-dedalus avatar elect86 avatar yc-feej avatar butchdean avatar renardjojo avatar snowylake avatar utoni avatar zryan3 avatar v7medz 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.