CoriEngine
Loading...
Searching...
No Matches
Cori::ImGuiPresets Namespace Reference

Here are stored all predefined ImGui window presets, you can only use this functions in Layer OnImGuiRender method, using it anywhere else will result in a crash. More...

Functions

static void Box2dDebugDraw (const glm::vec2 cameraSize, const glm::vec2 cameraPos, const int32_t pixelsPerMeter, Core::Layer *layer, const bool mouseDrag, const float mouseForce=1000.0f)
 Enables the debug draw of Box2D physics.
static void ScreenModeAndResolutionDropdowns ()
 Displays a window mode and screen mode selection window.
static void FpsCounter (const Core::GameTimer &timer)

Detailed Description

Here are stored all predefined ImGui window presets, you can only use this functions in Layer OnImGuiRender method, using it anywhere else will result in a crash.

Function Documentation

◆ Box2dDebugDraw()

void Cori::ImGuiPresets::Box2dDebugDraw ( const glm::vec2 cameraSize,
const glm::vec2 cameraPos,
const int32_t pixelsPerMeter,
Core::Layer * layer,
const bool mouseDrag,
const float mouseForce = 1000.0f )
static

Enables the debug draw of Box2D physics.

Parameters
cameraSizeSize of the debug cameras viewport, use GetSize() with your main Graphics::CameraController to align the main camera and debug camera.
cameraPosPosition of the debug camera, use GetSize() with your main Graphics::CameraController to align the main camera and debug camera.
pixelsPerMeterPixels in main camera per meter range. Use CORI_PIXELS_PER_METER.
layerPointer to the layer you're calling this function from.
mouseDragEnable or disable dynamic object dragging with a mouse.
mouseForceForce to apply when using mouse drag.
Note
Only usable in Layer OnImGuiRender method.

Definition at line 21 of file ImGuiPresets.hpp.

Here is the call graph for this function:

◆ FpsCounter()

void Cori::ImGuiPresets::FpsCounter ( const Core::GameTimer & timer)
static

Definition at line 116 of file ImGuiPresets.hpp.

Here is the call graph for this function:

◆ ScreenModeAndResolutionDropdowns()

void Cori::ImGuiPresets::ScreenModeAndResolutionDropdowns ( )
static

Displays a window mode and screen mode selection window.

Note
Only usable in Layer OnImGuiRender method.

Definition at line 40 of file ImGuiPresets.hpp.

Here is the call graph for this function: