Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
BindCallbacksToGLFW.cpp File Reference
#include "Input.pch.hpp"
#include "Input.hpp"
#include "resource/Window.hpp"
#include "system/BindCallbacksToGLFW.hpp"

Functions

static Engine::CoreGetCoreFromWindow (GLFWwindow *window)
 Get the core from the window user pointer.
static void KeyCallback (GLFWwindow *window, int key, int scancode, int action, int mods)
static void CharCallback (GLFWwindow *window, unsigned int codepoint)
static void CharModsCallback (GLFWwindow *window, unsigned int codepoint, int mods)
static void MouseButtonCallback (GLFWwindow *window, int button, int action, int mods)
static void CursorPosCallback (GLFWwindow *window, double xpos, double ypos)
static void CursorEnterCallback (GLFWwindow *window, int entered)
static void ScrollCallback (GLFWwindow *window, double xoffset, double yoffset)
static void DropCallback (GLFWwindow *window, int count, const char **paths)

Function Documentation

◆ CharCallback()

void CharCallback ( GLFWwindow * window,
unsigned int codepoint )
static

◆ CharModsCallback()

void CharModsCallback ( GLFWwindow * window,
unsigned int codepoint,
int mods )
static

◆ CursorEnterCallback()

void CursorEnterCallback ( GLFWwindow * window,
int entered )
static

◆ CursorPosCallback()

void CursorPosCallback ( GLFWwindow * window,
double xpos,
double ypos )
static

◆ DropCallback()

void DropCallback ( GLFWwindow * window,
int count,
const char ** paths )
static

◆ GetCoreFromWindow()

Engine::Core & GetCoreFromWindow ( GLFWwindow * window)
static

Get the core from the window user pointer.

Returns
A reference to the core.
Note
This is needed as the callbacks need to access the core, but they also need to be static functions to be used as GLFW callbacks.

◆ KeyCallback()

void KeyCallback ( GLFWwindow * window,
int key,
int scancode,
int action,
int mods )
static

◆ MouseButtonCallback()

void MouseButtonCallback ( GLFWwindow * window,
int button,
int action,
int mods )
static

◆ ScrollCallback()

void ScrollCallback ( GLFWwindow * window,
double xoffset,
double yoffset )
static