- Use extra stack space when building for WASM.
- Updated external libraries (Dear ImGui v1.89.4; {fmt} 10.0.0; volk 1.3.250).
- Force flush to stdout after each invocation of fmt::print to make it work with MSYS2.
abcg::flipHorizontally
andabcg::flipVertically
now accepts an l-value reference to a SDL surface instead of a non-null pointer.- Moved
abcg::toRedString
,abcg::toYellowString
andabcg::toBlueString
toabcgUtil.hpp
. - General improvements (fixed typos, code style, etc).
-
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.
- 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
.
- 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
.
- Fixed flickering effect when
glClear
is not called for each frame. For this fix to work,abcg::OpenGLSettings::preserveWebGLDrawingBuffer
must betrue
even when building for desktop.
abcg::Application::run
now takes by value a unique pointer toabcg::OpenGLWindow
. Sincestd::unique_ptr
cannot be copied, the caller must either usestd::move
or pass the pointer as an rvalue. This makes clear the intent of transferring ownership of the pointer, which was not explicit in the previous version that takes an lvalue reference.- Support for running multiple windows has been dropped. Multiple windows weren't working properly on Emscripten builds and aren't used in the course.
abcg::opengl::loadCubemap
now transforms the cube map textures to a right-handed coordinate system by default. A small loading overhead is incurred because some of the bitmaps are flipped vertically and horizontally. This behavior can be disabled by setting the (new) parameterrightHandedSystem
tofalse
.
abcg::Exception::OpenGL
now generates a string describing all OpenGL error messages returned byglGetError
when there are multiple errors.- All OpenGL functions from OpenGL ES 2.0 and ES 3.0 can now be qualified with the
abcg
namespace (e.g.abcg::glActiveTexture(0)
) for automatic error handling in debug builds. This is an alternative to theGL_CHECK
macro used in many engines to check for errors before and after each GL call. - Updated external libraries (Dear ImGui v1.84; cppitertools v2.1; {fmt} 8.0.1).
- Initial release, used during the first academic term of 2021.