2D_Game_Engine
Loading...
Searching...
No Matches
Functions | Variables
Window Namespace Reference

Functions

int InitGlfwWindow (const char *window_name, bool resizable)
 
void DeinitGlfwWindow ()
 
void ToggleFullScreen ()
 
void ToggleVSync ()
 
void SetResizable (bool resizable)
 
bool GetKeyState (int key, int state)
 
bool GetMouseButtonState (int button, int state)
 
void GetMousePos (double *x, double *y)
 
void ShowMetrics ()
 
void PrintDebugInfo ()
 
void GLAPIENTRY MessageCallback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam)
 
void GLAPIENTRY FramebufferSizeCallback (GLFWwindow *window, int width, int height)
 
void GLAPIENTRY ErrorCallback (int error, const char *description)
 
ApplicationCreateApplication ()
 
int parseLine (char *line)
 
int getMemInfoValue (const char *value)
 
int getStatusValue (const char *value)
 

Variables

GLFWwindow * Window
 
float Width
 
float Height
 
float BaseWidth
 
float BaseHeight
 
float FullscreenWidth
 
float FullscreenHeight
 
float FPS
 
float CurrentFrameTime
 
float LastFrameTime
 
float DeltaTime
 
float Alpha
 
bool IsFullscreen
 
bool IsVSync
 
bool ShowMetrics_
 
bool FramebufferUpdate =false
 
bool ProjUpdate =false
 
bool TextProjUpdate =false
 
const float MAX_WIDTH =10.0f
 
float MAX_HEIGHT
 

Function Documentation

◆ CreateApplication()

Application * Window::CreateApplication ( )
extern

Definition at line 53 of file application_template.cpp.

◆ DeinitGlfwWindow()

void Window::DeinitGlfwWindow ( )
extern

Definition at line 118 of file window.cpp.

◆ ErrorCallback()

void GLAPIENTRY Window::ErrorCallback ( int error,
const char * description )
extern

Definition at line 49 of file window.cpp.

◆ FramebufferSizeCallback()

void GLAPIENTRY Window::FramebufferSizeCallback ( GLFWwindow * window,
int width,
int height )
extern

Definition at line 25 of file window.cpp.

◆ GetKeyState()

bool Window::GetKeyState ( int key,
int state )
extern

Definition at line 217 of file window.cpp.

◆ getMemInfoValue()

int Window::getMemInfoValue ( const char * value)

Get value from /proc/meminfo

Parameters
valuea string containing the value name, for example MemTotal.
Returns
the value in kb

Definition at line 169 of file window.cpp.

◆ GetMouseButtonState()

bool Window::GetMouseButtonState ( int button,
int state )
extern

Definition at line 221 of file window.cpp.

◆ GetMousePos()

void Window::GetMousePos ( double * x,
double * y )
extern

Definition at line 53 of file window.cpp.

◆ getStatusValue()

int Window::getStatusValue ( const char * value)

Get value from /proc/self/status

Parameters
valuea string containing the value name, for example VmRSS.
Returns
the value in kb

Definition at line 189 of file window.cpp.

◆ InitGlfwWindow()

int Window::InitGlfwWindow ( const char * window_name,
bool resizable )
extern

Definition at line 71 of file window.cpp.

◆ MessageCallback()

void GLAPIENTRY Window::MessageCallback ( GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar * message,
const void * userParam )
extern

Definition at line 20 of file window.cpp.

◆ parseLine()

int Window::parseLine ( char * line)

Definition at line 153 of file window.cpp.

◆ PrintDebugInfo()

void Window::PrintDebugInfo ( )
extern

Definition at line 204 of file window.cpp.

◆ SetResizable()

void Window::SetResizable ( bool resizable)
extern

Definition at line 149 of file window.cpp.

◆ ShowMetrics()

void Window::ShowMetrics ( )
extern

Definition at line 58 of file window.cpp.

◆ ToggleFullScreen()

void Window::ToggleFullScreen ( )
extern

Definition at line 128 of file window.cpp.

◆ ToggleVSync()

void Window::ToggleVSync ( )
extern

Definition at line 144 of file window.cpp.

Variable Documentation

◆ Alpha

float Window::Alpha

Definition at line 235 of file window.cpp.

◆ BaseHeight

float Window::BaseHeight

Definition at line 44 of file window.hpp.

◆ BaseWidth

float Window::BaseWidth

Definition at line 228 of file window.cpp.

◆ CurrentFrameTime

float Window::CurrentFrameTime

Definition at line 232 of file window.cpp.

◆ DeltaTime

float Window::DeltaTime

Definition at line 234 of file window.cpp.

◆ FPS

float Window::FPS

Definition at line 231 of file window.cpp.

◆ FramebufferUpdate

bool Window::FramebufferUpdate =false

Definition at line 241 of file window.cpp.

◆ FullscreenHeight

float Window::FullscreenHeight

Definition at line 45 of file window.hpp.

◆ FullscreenWidth

float Window::FullscreenWidth

Definition at line 229 of file window.cpp.

◆ Height

float Window::Height

Definition at line 43 of file window.hpp.

◆ IsFullscreen

bool Window::IsFullscreen

Definition at line 237 of file window.cpp.

◆ IsVSync

bool Window::IsVSync

Definition at line 238 of file window.cpp.

◆ LastFrameTime

float Window::LastFrameTime

Definition at line 233 of file window.cpp.

◆ MAX_HEIGHT

float Window::MAX_HEIGHT

Definition at line 252 of file window.cpp.

◆ MAX_WIDTH

const float Window::MAX_WIDTH =10.0f

Definition at line 251 of file window.cpp.

◆ ProjUpdate

bool Window::ProjUpdate =false

Definition at line 242 of file window.cpp.

◆ ShowMetrics_

bool Window::ShowMetrics_

Definition at line 239 of file window.cpp.

◆ TextProjUpdate

bool Window::TextProjUpdate =false

Definition at line 243 of file window.cpp.

◆ Width

float Window::Width

Definition at line 227 of file window.cpp.

◆ Window

GLFWwindow * Window::Window

Definition at line 225 of file window.cpp.