Chronos 0.0
A advanced 2D rendering and animation system
Loading...
Searching...
No Matches
engine.cpp File Reference
#include "engine.hpp"
#include "logging.hpp"
#include "helper.hpp"
Include dependency graph for engine.cpp:

Go to the source code of this file.

Functions

static void framebuffer_size_callback (GLFWwindow *window, int width, int height)
 
static std::vector< const char * > getRequiredExtensions ()
 Gets the required extensions to be enabled.
 

Function Documentation

◆ framebuffer_size_callback()

static void framebuffer_size_callback ( GLFWwindow *  window,
int  width,
int  height 
)
static

Definition at line 30 of file engine.cpp.

31{
32 auto app = reinterpret_cast<Chronos::Engine::Engine*>(
33 glfwGetWindowUserPointer(window));
34 app->resizeFrameBuffer();
35 LOG(3, "Framebuffer resized")
36}
void resizeFrameBuffer()
Tells the engine that the window has to be resized. This is called by GLFW.
Definition engine.cpp:56
#define LOG(LEVEL, MESSAGE)
Definition logging.hpp:60

References LOG, and Chronos::Engine::Engine::resizeFrameBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRequiredExtensions()

static std::vector< const char * > getRequiredExtensions ( )
inlinestatic

Gets the required extensions to be enabled.

The required extensions to be enabled include the GLFW extensions for graphics and presentation. Vulkan validation layers are also enabled.

Returns
The required extensions to be enabled

Definition at line 305 of file engine.cpp.

306{
307 // here we set the needed extensions. For now it is only debug layer
308 uint32_t glfwExtensionCount = 0;
309 const char** glfwExtensions;
310 glfwExtensions = glfwGetRequiredInstanceExtensions(&glfwExtensionCount);
311 std::vector<const char*> extensions(
312 glfwExtensions, glfwExtensions + glfwExtensionCount);
313#ifdef ENABLE_VULKAN_VALIDATION_LAYERS
314 extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
315#endif
316 return extensions;
317}
Here is the caller graph for this function: