Giter Club home page Giter Club logo

circles-plus-plus's Introduction

Overview

This is another stint into OpenGL, but using C++ instead of Lisp on Windows.

This repo assumes a Windows 10/11 OS on 64 bit. I don't want to use Visual Studio, or its build tools, so I'll be utilizing MinGW's gcc/g++ (MinGW-64).

This README may not include everything needed to get this compiled on your architecture, or my targeted architecture. This can be resolved with a little bit of elbow-grease, but I will do my best to keep this file updated if I don't get too caught up in the creation of this program.

As you may notices, this repo's name insinuates that there will be more circles. That's the goal, but I feel pretty accomplished getting this repo to the point where it's at.

Where It's at currently

This will likely need to be combed through with a debugger and a profiler to make sure I'm not abusing memory. This can be run via CLI, but clicking on the executable doesn't work and gives an error.

I would like to resolve this, and then get this to a point where this can run on Linux and Windows.

Pretty much Finished:

Dependencies - Linux (Ubuntu)

Mesa-Utils

sudo apt-get install mesa-utils

libgl1-mesa-dev libglu1-mesa-dev

sudo apt-get install libgl1-mesa-dev

libglu1-mesa-dev (optional)

sudo apt-get install libglu1-mesa-dev

libxrandr-dev

sudo apt-get install libxrandr-dev

libxi-dev

sudo apt-get install libxi-dev

Nvidia

As per ubuntu's docs:

sudo ubuntu-drivers install

Or if another distro: https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html#package-manager

GLFW

If you don't have it, compile it.

Compile guide.

Commands I used (Ubuntu)

TODO: see about making shared libs if wanted

  • sudo apt-get install xorg-dev
  • sudo apt-get install cmake
  • sudo apt-get install libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules
  • cd libs-and-headers
  • git clone [email protected]:glfw/glfw
  • cd glfw
  • git checkout 3.3.9
  • cmake -S . -B build -G "Unix Makefiles"
  • cd build
  • make
  • cd ../../../
  • mkdir lib/gcc
  • cp -r libs-and-headers/glfw/build/src/libglfw3.a lib/gcc

(If necessary):

  • cp libs-and-headers/glfw/build/src/libglfw3.a lib/gcc

Of course, you can do what you want, even installing it on the system, but I wanted this to be local.

Dependencies - (Windows) Local

  • glm

I think this could be a system dependency instead if wanted, and can install, but I decided to add a git submodule to the modules/ dir.

Run: make dependencies after cloning w/modules, or after updating submodules.

Dependencies - (Windows) System

This section may not be needed for you, as I'm using an includes/ and lib/win64 directory that git will be tracking, but if you want to kaibosh this folder, and set it up yourself, then this section is for you. If not, then skip this section.

I've created a folder, libs-and-headers to throw libraries and headers into that would've been handled by Visual Studio.

Dependencies in this section, Dependencies - System that are needed, will be put in the aforementioned directory.

libstdc++-6.dll

I was having issues with this.

I didn't want to mess around with the path variable for this, so I just copied the libstdc++-6.dll from mingw and put it in libs-and-headers.

make mingw-deps should put that dll in the project root where the exe is generated.

GLFW

Version: 3.3.9 (WIN64)

Go to GLFW's download page and grab the binaries for 64-bit Windows. Or whatever is appropriate for your system.

Unzip this wherever you like, take the contents and place them in the libs-and-headers directory. If you unzipped directly into libs-and-headers, and you get a crazy name like glfw-3.3.9.bin.WIN64, rename it to glfw (or don't, it's up to you).

Put everyting in glfw's include/ dir into the project root's include/ dir, and put the appropriate compiler lib folder into the project root's lib/ dir.

Structure:

./
  .git
  ...
  libs-and-headers
    glfw/
      docs/
      include/
      lib-mingw-w64/
      ...
    ...
  src/
  ...

GLAD

This is the permalink that was given for the setup I used following the instructions at the creating a window portion of learnopengl: glad generated.

If I did things correctly, and you're on a similar architecture, this should work for you as well.

Follow the instructions left for the glad portion after downloading the zip file.

It's up to you if you want to put it in the libs-and-headers dir, or just put it straight into your includes folder.

Structure:

./
  ...
  libs-and-headers/
    glad/
      include/
      src/
      ...
    ...
  ...

Other Resources

circles-plus-plus's People

Contributors

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