SBgl 0.1.0
A graphics framework in C99
Loading...
Searching...
No Matches
sbgl_InputState Struct Reference

Represents the real-time state of physical inputs. More...

#include <sbgl_input.h>

Data Fields

bool keysDown [SBGL_SCANCODE_MAX]
 
bool keysPressed [SBGL_SCANCODE_MAX]
 
bool mouseDown [SBGL_MOUSE_BUTTON_MAX]
 
int mouseX
 
int mouseY
 
int mouseDeltaX
 
int mouseDeltaY
 
int _internalMouseX
 
int _internalMouseY
 

Detailed Description

Represents the real-time state of physical inputs.

Adheres to Data-Oriented Design by storing flat arrays of booleans for O(1) lookup and contiguous memory access during batch processing.

Definition at line 165 of file sbgl_input.h.

Field Documentation

◆ _internalMouseX

int sbgl_InputState::_internalMouseX

Definition at line 171 of file sbgl_input.h.

◆ _internalMouseY

int sbgl_InputState::_internalMouseY

Private tracking for delta calculation.

Definition at line 171 of file sbgl_input.h.

◆ keysDown

bool sbgl_InputState::keysDown[SBGL_SCANCODE_MAX]

Physical state of keys.

Definition at line 166 of file sbgl_input.h.

◆ keysPressed

bool sbgl_InputState::keysPressed[SBGL_SCANCODE_MAX]

Set once when key is pressed, reset every frame.

Definition at line 167 of file sbgl_input.h.

◆ mouseDeltaX

int sbgl_InputState::mouseDeltaX

Definition at line 170 of file sbgl_input.h.

◆ mouseDeltaY

int sbgl_InputState::mouseDeltaY

Relative motion since last frame.

Definition at line 170 of file sbgl_input.h.

◆ mouseDown

bool sbgl_InputState::mouseDown[SBGL_MOUSE_BUTTON_MAX]

Physical state of mouse buttons.

Definition at line 168 of file sbgl_input.h.

◆ mouseX

int sbgl_InputState::mouseX

Definition at line 169 of file sbgl_input.h.

◆ mouseY

int sbgl_InputState::mouseY

Absolute window coordinates.

Definition at line 169 of file sbgl_input.h.


The documentation for this struct was generated from the following file: