Skip to content

NicholasFalcone/open_engine

Repository files navigation

OpenGL Cube Project

A simple example of a rotating 3D cube using OpenGL 3.3, GLFW, and C++.

⚠️ Critical Step: GLAD Setup

The project will not work without this. I cannot do this for you.

  1. Go to https://glad.dav1d.de/
  2. Language: C/C++
  3. Specification: OpenGL
  4. API: gl -> Version 3.3 (Profile: Core)
  5. Options: Check Generate a loader
  6. Click Generate
  7. Download the zip file (glad.zip)
  8. Extract the contents.
  9. Copy the folders include and src from the zip into the libs/glad/ folder of this project.
    • CHECK: You must have libs/glad/include/glad/glad.h
    • CHECK: You must have libs/glad/src/glad.c

How to Run (Windows - Method 1: Visual Studio)

This is the easiest way on Windows.

  1. Open Visual Studio (2019 or 2022).
  2. Select "Open a local folder".
  3. Navigate to this project folder (c:/Users/nicho/source/repos/test) and select it.
  4. Visual Studio will detect CMakeLists.txt and configure the project automatically.
    • Note: If it fails, check the "Output" window. It likely means you didn't do the GLAD setup above.
  5. Select OpenGLCube.exe from the startup item dropdown (green play button).
  6. Click Play / Start.

How to Run (Windows - Method 2: Command Line)

Only works if you have CMake installed and in your PATH.

  1. Open CMD or PowerShell in this folder.
  2. Run:
    cmake -S . -B build
    cmake --build build
  3. Run the game:
    ./build/bin/OpenGLCube.exe

How to Run (Linux)

  1. Ensure you have dependencies installed (e.g., build-essential, cmake, libxrandr-dev, libxinerama-dev, libxcursor-dev, libxi-dev, libgl1-mesa-dev).
  2. Open a terminal in this folder.
  3. Make the build script executable:
    chmod +x build_project.sh
  4. Run the build script:
    ./build_project.sh
  5. Or manually:
    cmake -S . -B build
    cmake --build build
    ./build/bin/OpenGLCube

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors