Code Monkey home page Code Monkey logo

gl-template's Introduction

OpenGL Template

English | δΈ­ζ–‡

Build Status Linux Windows OSX

A simple OpenGL application template aiming at reducing the procedures of varied configurations on different platforms with the help of CMake. Some OpenGL functions are also packaged for reference(Under development). An additional function is also provided to embed resource files such as images, shaders into a single executable file.

Examples can be found in ./example.

Build

Windows(Mingw)

git submodule update --init
mkdir build
cd build
cmake .. -G "MinGW Makefiles"
make

Windows(Visual Studio 2017 or higher)

  1. Files->Open->CMake, choose CMakeLists.txt in the root directory of this project.

  2. CMake->Generate all

Linux

git submodule update --init
mkdir build
cd build
cmake ..
make

OSX

git submodule update --init
mkdir build
cd build
cmake ..
make

3rd-party libraries

  1. assimp: The official Open-Asset-Importer-Library Repository.

  2. bin2c: A very simple utility for converting a binary file to a c source file.

  3. glew-cmake: GLEW is a cross-platform open-source C/C++ extension loading library.

  4. glfw: A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input.

  5. glm: GLM is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.

  6. imgui: ImGui is a bloat-free graphical user interface library for C++.

  7. mango: A multi-platform low-level development framework for graphics programmers.

Related Documents

  1. Quaternion proof

  2. What are the different texture maps for

Screenshots

Shade

Normal Visualization

Guided filter

Imgui

gl-template's People

Contributors

b1060t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gl-template's Issues

Embedding resource files into executable file fails on osx

Tried gobjcopy with all possible parameters and no one worked. Since I don't have an OSX operating system, It's difficult to find out what happened.
CMake code:

ADD_CUSTOM_COMMAND(OUTPUT ${out_f}
          COMMAND /usr/local/opt/binutils/bin/gobjcopy -I binary -O mach-o-x86-64 -B i386:x86-64 ${src_f} ${out_f}
          DEPENDS ${in_f}
          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
          COMMENT "Building object ${out_f}"
          VERBATIM
          )

Output:

[ 91%] Building object /Users/runner/runners/2.263.0/work/GL-Template/GL-Template/build/shaders/shade.vert.o
Scanning dependencies of target normal
[ 92%] Building CXX object CMakeFiles/normal.dir/main/normalvisualize.cpp.o
[ 92%] Linking CXX executable normal
ld: warning: unknown stabs type 0x81 in shaders/shade.vert.o
ld: warning: unknown stabs type 0x81 in shaders/shade.vert.o
ld: warning: unknown stabs type 0x5F in shaders/shade.vert.o
Undefined symbols for architecture x86_64:
  "__binary_shaders_shade_vert_end", referenced from:
      _main in normalvisualize.cpp.o
  "__binary_shaders_shade_vert_start", referenced from:
      _main in normalvisualize.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

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.