v3.0.0
v3.0.0
New features
-
Added support for building in Visual Studio with MSVC. For that to work, GLEW, SDL2 and SDL2_image development libraries must be installed and set up as follows: the GLEW installation directory must be added to the system Path variable; the environment variables
SDL2DIR
andSDL2IMAGEDIR
must be set to the installation directory of SDL2 and SDL2_image, respectively. Debugging is also supported. However, building multiple executables is not supported in VS. Thus, make sure to use a singleadd_subdirectory()
command in theCMakeLists.txt
of the root directory. Also notice that the default output directory will beout/build
instead ofbuild
if the project is built in the IDE. -
Added support for building with MSVC in VS Code. Multiple executables are supported, as well as debugging. Below is an example of a
launch.json
for debugging the "Hello, World!" project:{ "version": "0.2.0", "configurations": [ { "name": "C++ Launch (Windows)", "type": "cppvsdbg", "request": "launch", "program": "${workspaceFolder}/build/bin/helloworld/helloworld.exe", "symbolSearchPath": "${workspaceFolder}/build/bin/Debug", "console": "integratedTerminal", "args": [], "stopAtEntry": false } ] }
-
Updated
abcg::createOpenGLProgram
with support for additional shader types and no dependance onabcg::OpenGLWindow
. The function now accepts an object of typeabcg::ShaderSource
containing the paths or codes of any combination of shaders supported by OpenGL (vertex, fragment, geometry, tess control/evaluation, and compute shaders). The function also accepts a boolean as a second argument to toggle on/off exceptions on build errors. By default, exception throwing is enabled. -
As an alternative to
abcg::createOpenGLProgram
, it is possible to split the build process into smaller parts by callingabcg::triggerOpenGLShaderCompile
,abcg::checkOpenGLShaderCompile
,abcg::triggerOpenGLShaderLink
, andabcg::checkOpenGLShaderLink
in sequence. This can be useful to prevent halting the application when building complex programs. -
Added
abcg::Application::getBasePath
andabcg::Application::getAssetsPath
as static member functions. -
The HTML element ID used for registering the fullscreen callback function can now be set with
abcg::WindowSettings::fullscreenElementID
(default is#canvas
). -
abcg::loadOpenGLTexture
andabcg::loadOpenGLCubemap
now accepts creation info structuresabcg::OpenGLTextureCreateInfo
andabcg::OpenGLCubemapCreateInfo
, respectively. -
Added
abcg::hashCombine
andabcg::hashCombineSeed
functions to easily combine hash values. -
Added support for Vulkan.
Breaking changes
- ABCg filenames changed to camel case.
abcg::OpenGLWindow::getAssetsPath
replaced withabcg::Application::getAssetsPath
.abcg::OpenGLWindow::createProgramFromFile
andabcg::OpenGLWindow::createProgramFromString
removed. Useabcg::createOpenGLProgram
instead.abcg::OpenGLWindow::handleEvent
renamed toabcg::OpenGLWindow::onEvent
.abcg::OpenGLWindow::initializeGL
renamed toabcg::OpenGLWindow::onCreate
.abcg::OpenGLWindow::paintGL
renamed toabcg::OpenGLWindow::onPaint
.abcg::OpenGLWindow::paintUI
renamed toabcg::OpenGLWindow::onPaintUI
.abcg::OpenGLWindow::resizeGL
renamed toabcg::OpenGLWindow::onResize
.abcg::OpenGLWindow::terminateGL
renamed toabcg::OpenGLWindow::onDestroy
.- Namespace
abcg::opengl
removed. abcg::opengl::loadTexture
renamed toabcg::loadOpenGLTexture
.abcg::opengl::loadCubemap
renamed toabcg::loadOpenGLCubemap
.abcg::Application
does not take ownership ofabcg::OpenGLWindow
anymore.abcg::Application::run
now accepts an lvalue reference toabcg::OpenGLWindow
.abcg_string.hpp
andabcg_string.cpp
removed.- The static member functions of
abcg::Exception
, namelyRuntime
,OpenGL
,SDL
, andSDLImage
, are now classes of their own:abcg::RuntimeError
,abcg::OpenGLError
,abcg::SDLError
, andabcg::SDLImageError
. This simplifies the syntax for throwing ABCg exceptions. For instance,throw abcg::Exception{abcg::Exception::runtime(...)}
now becomesthrow abcg::RuntimeError(...)
. - Default value of
abcg::OpenGLSettings::stencilBufferSize
changed from 8 to 0. abcg::OpenGLSettings::vsync
renamed toabcg::OpenGLSettings::vSync
.abcg::OpenGLWindow::onResize
parameters changed fromint width, int height
toglm::ivec2 size
.
Other changes
- Updated external libraries (Dear ImGui v1.86; {fmt} 8.1.1; GSL 4.0.0).
- Minimum required version for CMake increased to 3.21.
abcg::OpenGLWindow::getDeltaTime()
markednoexcept
.