Cross-platform simple 3d engine
BSD-3-CLAUSE License
Welcome to the GraphToys project! This repository contains a collection of various graphical models and simulations, showcasing different aspects of computer graphics and simulation techniques.
You can build the project using either make
or CMake
. Both options are supported.
make
or CMake
installed on your system.git clone https://github.com/resetius/graphtoys
git submodule init
git submodule update
make
:
make
CMake
:
mkdir build
cd build
cmake ..
make
After building, you can run the application using the following command:
./main.exe model_name --cfg config-file
Replace model_name
with the name of the model you want to run, and config-file
with the path to your configuration file if needed.
Here are the models you can explore in this project:
The configuration file for the GraphToys project uses the INI format, which is a simple, standard format for configuration files. The file is divided into sections, each marked by a header in square brackets ([]
). Here's a breakdown of the sections and parameters you can set:
[render]
SectionThis section is used to configure rendering settings.
api: Set the graphics API to be used. You can choose between vulkan
and opengl
.
api = vulkan
or
api = opengl
width: Define the width of the rendering window in pixels.
width = 800
height: Define the height of the rendering window in pixels.
height = 600
vsync: Set this to on
or off
to enable or disable vertical synchronization.
vsync = on
or
vsync = off
[model_name]
SectionsEach model in the GraphToys project has its own dedicated section in the configuration file. The section name corresponds to the name of the model (for example, [torus]
, [triangle]
, etc.).
In these sections, you can specify various parameters that are unique to each model. It's recommended to refer to the source code in models/model_name.c
for detailed information on what parameters can be set for each specific model.
For example, if you're configuring the torus
model, you would look for parameters in the models/torus.c
file and set them in the [torus]
section of your configuration file.
Here's an example of what a configuration file might look like:
[render]
api = vulkan
width = 1024
height = 768
vsync = off
[torus]
; torus-specific settings
[triangle]
; triangle-specific settings
[mandelbrot]
; mandelbrot-specific settings