NWengine 0.9
Loading...
Searching...
No Matches
Context Class Reference

The Context class represents the application context. More...

#include <Context.h>

Static Public Member Functions

static voidInitContext (int scrWidth, int scrHeight)
 Initializes the application context.
 
static bool ShouldClose ()
 Checks if the application should close.
 
static void Update ()
 Updates the application context.
 
static void EnableBlend (bool status=true)
 Enables or disables blending.
 
static void EnableWireframe (bool status=true)
 Enables or disables wireframe rendering.
 
static void EnableDepthTest (bool status=true)
 Enables or disables depth testing.
 
static void Clear (float r=0.0f, float g=0.0f, float b=0.0f, float a=1.0f)
 Clears the screen with the specified color.
 
static void SetViewPort (int x, int y, int sizeX, int sizeY)
 Sets the viewport.
 
static void SetFullscreen (bool state=true)
 Sets the application to fullscreen mode or windowed mode.
 
static void SetTitle (const char *title)
 Sets the title of the application window.
 
static void Destroy ()
 Destroys the application context.
 

Static Public Attributes

static voidwindow = nullptr
 The window handle.
 
static int vSync = 1
 The vertical synchronization value.
 
static int NATIVE_WIDTH = 1080
 The native width of the application window.
 
static int NATIVE_HEIGHT = 720
 The native height of the application window.
 
static int WINDOW_WIDTH = 1080
 The width of the application window.
 
static int WINDOW_HEIGHT = 720
 The height of the application window.
 

Detailed Description

The Context class represents the application context.

Member Function Documentation

◆ Clear()

void Context::Clear ( float r = 0.0f,
float g = 0.0f,
float b = 0.0f,
float a = 1.0f )
static

Clears the screen with the specified color.

Parameters
rThe red component of the color.
gThe green component of the color.
bThe blue component of the color.
aThe alpha component of the color.

RGBA

◆ EnableBlend()

void Context::EnableBlend ( bool status = true)
static

Enables or disables blending.

Parameters
statusThe blending status. True to enable blending, false to disable blending.

◆ EnableDepthTest()

void Context::EnableDepthTest ( bool status = true)
static

Enables or disables depth testing.

Parameters
statusThe depth testing status. True to enable depth testing, false to disable depth testing.

◆ EnableWireframe()

void Context::EnableWireframe ( bool status = true)
static

Enables or disables wireframe rendering.

Parameters
statusThe wireframe status. True to enable wireframe rendering, false to disable wireframe rendering.

◆ InitContext()

void * Context::InitContext ( int scrWidth,
int scrHeight )
static

Initializes the application context.

Parameters
scrWidthThe screen width.
scrHeightThe screen height.
Returns
A pointer to the initialized context.

◆ SetFullscreen()

void Context::SetFullscreen ( bool state = true)
static

Sets the application to fullscreen mode or windowed mode.

Parameters
stateThe fullscreen state. True for fullscreen mode, false for windowed mode.

◆ SetTitle()

void Context::SetTitle ( const char * title)
static

Sets the title of the application window.

Parameters
titleThe title of the window.

◆ SetViewPort()

void Context::SetViewPort ( int x,
int y,
int sizeX,
int sizeY )
static

Sets the viewport.

Parameters
xThe x-coordinate of the viewport.
yThe y-coordinate of the viewport.
sizeXThe width of the viewport.
sizeYThe height of the viewport.

◆ ShouldClose()

bool Context::ShouldClose ( )
static

Checks if the application should close.

Returns
True if the application should close, false otherwise.

The documentation for this class was generated from the following files: