Giter Site home page Giter Site logo

kravantokh / opengl_template Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 2.09 MB

Basic OpenGL project template for c++ with CMake, glfw and gl3w meant to work out of the box on Windows and Linux

License: GNU General Public License v3.0

CMake 89.79% Shell 10.21%
cmake cpp gl3w glfw opengl

opengl_template's Introduction

OpenGL_template

DISCLAIMER: This project is work in progress and thus breaking changes may appear without any previou announcement.

Basic OpenGL project template for c++ with CMake, glfw and gl3w meant to work out of the box on Windows (currently considered untested due to recent major changes) and Linux and eliminate as much frustration as possible in the setup phase of any OpenGL project or OpenGL prototype. It includes glfw.

It also features my OpenGL C-style C++11 wrapper library for a less verbose API for OpenGL along with gl3w as the OpenGL function loader. More details.

You can find examples of how to use this API in the examples folder.

Cloning

You should clone the repository with git clone --recursive https://github.com/Kravantokh/OpenGL_GLEW_GLFW_template/\

Current code

The file src/main.cpp contains a basic example code which creates an openGL context and opens it in a window with the help of glfw.

Prerequisites (for using the included compile.sh)

  • CMake
  • GNU GCC (mingw on Windows)
  • ninja
  • glu*
  • Python (3 or 2 should both work)

*Linux-only dependency - may be installed with the package manager. On Arch the package glu exists on its own. On Debian the package containing it is libglu1-mesa-dev. On other distros it may be contained in a different package.

Build process

  • Linux: run build.sh

On linux don't forget to run chmod +x build.sh.

Until now the build process has been succesfully tested on Arch Linux, Kubuntu 20.10 and Windows 10(before the major changes) with the mentioned build tools.

Errors you may meet

XInput headers not found; install libxi development package - Installing the package xorg-dev may help on Debian distros.

opengl_template's People

Contributors

kravantokh avatar

Stargazers

 avatar

Watchers

 avatar  avatar

opengl_template's Issues

nonesense error at shader compilation

Sometimes the error handler does not properly print some errors in shader compilation.

Uniform location: 1Error during shader compilation: 0(60) : error C0000: syntax error, unexpected $undefined at token "<undefined>"

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.