Code Monkey home page Code Monkey logo

gbase's Introduction

gbase

A platform agnostic quick start project for graphics programming with OpenGL and GLFW

Prerequisites

Setup

  1. Create a /vendors folder somewhere on your disk
  2. Download the glfw and glad source. For glad choose the OpenGL version of your liking and select core mode. Scroll down and click generate. Then download the glad.zip file.
  3. Unzip both glfw and glad into your /vendors folder. The file structure should look something like this: (For example on WIN64)
C:\DEV\VENDORS
├───glad
└───glfw-3.4
  1. Update the EXE_NAME variable in CMakeLists.txt to whatever you want to name your exe.
  2. Set your VENDORS variable in CMakeLists.txt to where your vendors folder is. On Linux and Macos you can navigate to your vendors folder and type pwd to get the absolute path. Note that this path must be an ABSOLUTE PATH. On WIN64 you can copy the path from the file explorer. Make sure that you use forward slashes in the WIN64 path.
  3. Configure whether you want to use C or C++ in CMakeLists.txt
  4. If you are on MacOS, CMakeLists.txt is defaulted to generating a make file for the M series macs. If you want to compile for an Intel machine while on an M series architecture, you should uncomment the line: set(INTEL_APPLE 1)

Build

To generate the make files or the project solution on windows navigate to the project root folder and type the following command in a terminal / command prompt (WIN64).

mkdir build
cd build
cmake ..

On Unix based systems you can then run the make command to build your project and then ./your-exe-name to run your exe.

On WIN64 you'll want to open your-exe-name.sln in Visual Studio. You an then build the exe by right clicking the project in the solution explorer and hitting build / rebuild.

ADDENDUM

If you get a warning about the source being from way in the future thats probably because the server that glad uses to generate the files is ahead of your time zone. When your time zone catches up to the time the file was generated the warnings will go away but you can also open glad.h and glad.c and save the files. That will override the time metadata to your time zone

gbase's People

Contributors

benweisz avatar

Watchers

 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.