Skip to content

v3.0.0

Compare
Choose a tag to compare
@hbatagelo hbatagelo released this 16 Sep 02:27
· 7 commits to main since this release

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 and SDL2IMAGEDIR 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 single add_subdirectory() command in the CMakeLists.txt of the root directory. Also notice that the default output directory will be out/build instead of build 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 on abcg::OpenGLWindow. The function now accepts an object of type abcg::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 calling abcg::triggerOpenGLShaderCompile, abcg::checkOpenGLShaderCompile, abcg::triggerOpenGLShaderLink, and abcg::checkOpenGLShaderLink in sequence. This can be useful to prevent halting the application when building complex programs.

  • Added abcg::Application::getBasePath and abcg::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 and abcg::loadOpenGLCubemap now accepts creation info structures abcg::OpenGLTextureCreateInfo and abcg::OpenGLCubemapCreateInfo, respectively.

  • Added abcg::hashCombine and abcg::hashCombineSeed functions to easily combine hash values.

  • Added support for Vulkan.

Breaking changes

  • ABCg filenames changed to camel case.
  • abcg::OpenGLWindow::getAssetsPath replaced with abcg::Application::getAssetsPath.
  • abcg::OpenGLWindow::createProgramFromFile and abcg::OpenGLWindow::createProgramFromString removed. Use abcg::createOpenGLProgram instead.
  • abcg::OpenGLWindow::handleEvent renamed to abcg::OpenGLWindow::onEvent.
  • abcg::OpenGLWindow::initializeGL renamed to abcg::OpenGLWindow::onCreate.
  • abcg::OpenGLWindow::paintGL renamed to abcg::OpenGLWindow::onPaint.
  • abcg::OpenGLWindow::paintUI renamed to abcg::OpenGLWindow::onPaintUI.
  • abcg::OpenGLWindow::resizeGL renamed to abcg::OpenGLWindow::onResize.
  • abcg::OpenGLWindow::terminateGL renamed to abcg::OpenGLWindow::onDestroy.
  • Namespace abcg::opengl removed.
  • abcg::opengl::loadTexture renamed to abcg::loadOpenGLTexture.
  • abcg::opengl::loadCubemap renamed to abcg::loadOpenGLCubemap.
  • abcg::Application does not take ownership of abcg::OpenGLWindow anymore. abcg::Application::run now accepts an lvalue reference to abcg::OpenGLWindow.
  • abcg_string.hpp and abcg_string.cpp removed.
  • The static member functions of abcg::Exception, namely Runtime, OpenGL, SDL, and SDLImage, are now classes of their own: abcg::RuntimeError, abcg::OpenGLError, abcg::SDLError, and abcg::SDLImageError. This simplifies the syntax for throwing ABCg exceptions. For instance, throw abcg::Exception{abcg::Exception::runtime(...)} now becomes throw abcg::RuntimeError(...).
  • Default value of abcg::OpenGLSettings::stencilBufferSize changed from 8 to 0.
  • abcg::OpenGLSettings::vsync renamed to abcg::OpenGLSettings::vSync.
  • abcg::OpenGLWindow::onResize parameters changed from int width, int height to glm::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() marked noexcept.