GithubHelp home page GithubHelp logo

zoeybiulala / getting-started Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brynmawr-cs312-2021/getting-started

0.0 0.0 0.0 2.11 MB

A simple demo to test whether GLFW, GLEW, and OpenGL are setup correctly

License: MIT License

CMake 74.34% C 3.82% C++ 21.84%

getting-started's Introduction

getting-started

A simple demo to test whether GLFW, GLEW, OpenGL, and GLM are setup correctly.

Tools and dependencies

To obtain the source and generate build files, you will need to install git and cmake. To build, you will also need to install GLEW, GLFW, and GLM.

  • GLEW: Needed for accessing openGL 4.0 features
  • GLFW: Implements our window and user interaction events, such as mouse and keyboard
  • GLM: Implements useful vector and matrix functionality for graphics

On windows, the dependencies are included in this repository. For macOS, you will need to install a subset of them separately.

Windows

On windows

macOS

On macOS, run the following commands in terminal

  • brew install cmake
  • brew install glew
  • brew install glfw3

GLM is included with this repository but you can also install it using the instructions here.

Ubuntu

On Ubuntu, run the following commands in terminal

  • sudo apt-get install cmake
  • sudo apt-get libglew-dev
  • sudo apt-get install libglfw3-dev

GLM is included with this repository but you can also install it.

  • sudo apt-get install libglm-dev

Build on windows

First, open the folder containing this source in Explorer. From here, right-click and open Git Bash. This will open a terminal window.

From git bash, run the following commands

  • mkdir build
  • cd build
  • cmake -G "Visual Studio 16 2019" ..

Running these commands in git bash should look something like this.

The above commands will create Visual Studio project files inside the build folder. It is important to create the subdirectory build, to keep our repository clean of generated files.

Double click on CS312-GettingStarted.sln to open the project. If you don't know where to start with visual studio, or need a refresher, this video shows how to build, run, and debug with Visual Studio

Build on macOS

From terminal, navigate to the folder containing this code. Then, run the following commands

  • mkdir build
  • cd build
  • cmake ..
  • make
  • ./bin/testGLFW

Running these commands in terminal should look something like this.

Running cmake .. will generate Makefiles for this project. Running make compiles the program. The last command runs the compiled program. You can also use Visual Studio to run and debug this program. It is important to create the subdirectory build, to keep our repository clean of generated files.

If you don't know where to start compiling and running C++, or need a refresher, this video shows how to build, run, and debug with terminal or Visual Studio Code on macOS

Build on Ubuntu

From terminal, navigate to the folder containing this code. Then, run the following commands

  • mkdir build
  • cd build
  • cmake ..
  • make
  • ./bin/testGLFW

Running cmake .. will generate Makefiles for this project. Running make compiles the program. The last command runs the compiled program. You can also use Visual Studio to run and debug this program. It is important to create the subdirectory build, to keep our repository clean of generated files.

getting-started's People

Contributors

alinen 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.