The Nut Engine is a lightweight and modular graphics engine designed to facilitate the development of 3D applications using OpenGL. It abstracts the complexity of OpenGL setup and rendering, providing a simple interface for loading models, shaders, and rendering scenes. The engine is built with C++ and utilizes GLFW for window management and GLM for mathematics.
- Model Loading: Supports loading and rendering 3D models.
- Shader Management: Allows for easy integration and management of vertex and fragment shaders.
- Camera Control: Implements basic camera movements and view transformations.
- OpenGL Integration: Simplifies OpenGL initialization and rendering processes.
- Extensible Architecture: Easily add new features and extend functionality.
nut/
├── build/ # Directory for build files
├── external/ # External libraries
│ ├── glfw/ # GLFW library
│ └── glad/ # GLAD library
├── src/ # Source files
│ ├── Shader.cpp # Shader class implementation
│ ├── Model.cpp # Model class implementation
│ ├── Renderer.cpp # Renderer class implementation
│ └── Engine.cpp # Main engine implementation
├── shaders/ # Shader files
│ ├── vertex_shader.glsl # Vertex shader source
│ └── fragment_shader.glsl # Fragment shader source
├── CMakeLists.txt # CMake build configuration
└── main.cpp # Entry point for the application
- C++17
- CMake (version 3.10 or higher)
- GLFW (included in external folder)
- GLAD (included in external folder)
- OpenGL
To build the project, follow these steps:
- Clone the repository or download the project files.
- Open a terminal and navigate to the project directory.
- Create a build directory:
mkdir build
- Compile the project:
make
- Run the application:
build/app
To use the engine, create an instance of the Engine
class and call the render
method with the path to the model you want to load. For example:
Engine engine;
engine.render("path/to/your/model.obj");
Contributions are welcome! If you have suggestions or improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.