ABCg
v3.1.1
Development framework for MCTA008-17
|
Development framework accompanying the course MCTA008-17 Computer Graphics at UFABC.
ABCg is a lightweight C++ framework that simplifies the development of 3D graphics applications based on OpenGL, OpenGL ES, WebGL, and Vulkan. It is designed for the tutorials and assignments of the course "MCTA008-17 Computer Graphics" taught at Federal University of ABC (UFABC).
abcg::
namespace to enable throwing exceptions with descriptive GL error messages that include the source code location.The following minimum requirements are shared among all platforms:
For WebAssembly:
For building desktop applications:
Desktop dependencies can be resolved automatically with Conan, but it is disabled by default. To use Conan, install Conan 1.47 or a later 1.* version (ABCg is not compatible with Conan 2.0!) and then configure CMake with -DENABLE_CONAN=ON
.
The default renderer backend is OpenGL (CMake option GRAPHICS_API=OpenGL
). To use the Vulkan backend, configure CMake with -DGRAPHICS_API=Vulkan
.
Start by cloning the repository:
# Get abcg repo git clone https://github.com/hbatagelo/abcg.git # Enter the directory cd abcg
Follow the instructions below to build the "Hello, World!" sample located in abcg/examples/helloworld
.
build-vs.bat
for building with the Visual Studio 2022 toolchain.build.bat
for building with GCC (MinGW-w64).build-vs.bat
and build.bat
accept two optional arguments: (1) the build type, which is Release
by default, and (2) an extra CMake option. For example, for a Debug
build with -DENABLE_CONAN=ON
using VS 2022, run
build-vs.bat Debug -DENABLE_CONAN=ON
Run ./build.sh
.
The script accepts two optional arguments: (1) the build type, which is Release
by default, and (2) an extra CMake option. For example, for a Debug
build with -DENABLE_CONAN=ON
, run
./build.sh Debug -DENABLE_CONAN=ON
build-wasm.bat
(Windows) or ./build-wasm.sh
(Linux/macOS).runweb.bat
(Windows) or ./runweb.sh
(Linux/macOS) for setting up a local web server.ABCg can be built in a Docker container. The Dockerfile provided is based on Ubuntu 22.04 and includes Emscripten.
abcg
): sudo docker build -t abcg .
abcg_container
): sudo docker create -it \ -p 8080:8080 \ -v /tmp/.X11-unix:/tmp/.X11-unix:rw \ -e DISPLAY \ --name abcg_container abcg
sudo docker start -ai abcg_containerOn NVIDIA GPUs, install the NVIDIA Container Toolkit to allow the container to use the host's NVIDIA driver and X server. Expose the X server with
sudo xhost +local:root
before starting the container.ABCg is licensed under the MIT License. See LICENSE for more information.