shengine pre-release
shengine by mrsinho
|
Declares the ShEngine structure and associated functions for managing the engine. More...
#include "shengine/shEngineVkCore.h"
#include "shengine/shWindow.h"
#include "shengine/shTime.h"
#include "shengine/shProfiling.h"
#include "shengine/shInput.h"
#include "shengine/shScene.h"
#include "shengine/shEngineUI.h"
#include "shapplication-host/shApplicationHost.h"
#include "shenvironment/shEnvironment.h"
#include "shenvironment/shFileUtilities.h"
#include <shthreads/shthreads.h>
#include <smd/smd.h>
Go to the source code of this file.
Data Structures | |
struct | ShEngine |
Represents the ShEngine structure, which is the main instance of the engine. More... | |
Macros | |
#define | SH_ENGINE_SWAPCHAIN_IMAGE_COUNT 2 |
Number of swapchain images in the engine. | |
#define | SH_ENGINE_MAX_SWAPCHAIN_IMAGE_COUNT 6 |
Maximum number of swapchain images in the engine. | |
#define | SH_ENGINE_RENDERPASS_ATTACHMENT_COUNT 3 |
Number of renderpass attachments in the engine. | |
#define | SH_ENGINE_SUBPASS_COLOR_ATTACHMENT_COUNT 1 |
Number of color attachments in a subpass in the engine. | |
#define | SH_TRUE 1 |
Boolean value representing true. | |
#define | SH_FALSE 0 |
Boolean value representing false. | |
#define | shAllocateEngine() (ShEngine*)calloc(1, sizeof(ShEngine)); |
Allocates memory for a new ShEngine instance. | |
#define | shFreeEngine(p_engine) free(p_engine); (p_engine) = NULL |
Frees the memory of a ShEngine instance. | |
#define | shEngineError(condition, msg, failure_expression) if ((int)(condition)) { printf("shengine error: %s.\n", msg); failure_expression; } |
Generates an error message for the shengine module. | |
#define | shApplicationError(condition, msg, failure_expression) if ((int)(condition)) { printf("shapplication error: %s. \n", msg); failure_expression; } |
Generates an error message for the ShApplication. | |
#define | SH_ENGINE_READY 1 |
Represents the engine being ready. | |
#define | SH_ENGINE_NOT_READY 0 |
Represents the engine not being ready. | |
Typedefs | |
typedef struct ShEngine | ShEngine |
Functions | |
uint8_t | shEngineSetupVulkan (ShEngine *p_engine) |
Sets up Vulkan for the shengine module. | |
uint8_t | shAllocateProfilingHandle (ShEngine *p_engine) |
Allocates a profiling handle for the shengine module. | |
uint8_t | shSetEngineState (ShEngine *p_engine) |
Sets the state of the shengine module. | |
uint8_t | shResetEngineState (ShEngine *p_engine) |
Resets the state of the shengine module. | |
uint8_t | shEngineSafeState (ShEngine *p_engine) |
Safely sets the state of the shengine module. | |
uint8_t | shEngineFrameResize (ShEngine *p_engine) |
Resizes the frame in the shengine module. | |
uint8_t | shEngineProfilingUpdate (ShEngine *p_engine) |
Updates the profiling in the shengine module. | |
uint8_t | shEngineVulkanUpdate (ShEngine *p_engine) |
Updates Vulkan in the shengine module. | |
uint8_t | shEngineUpdateState (ShEngine *p_engine) |
Updates the state of the shengine module. | |
uint8_t | shEngineManageState (ShEngine *p_engine, uint8_t ready) |
Manages the state of the shengine module. | |
uint8_t | shEngineVulkanRelease (ShEngine *p_engine) |
Releases Vulkan resources in the shengine module. | |
uint8_t | shEngineRelease (ShEngine *p_engine) |
Releases resources in the shengine module. | |
void | shEngineShutdown (ShEngine *p_engine) |
Shuts down the shengine module. | |
Declares the ShEngine structure and associated functions for managing the engine.
It contains and manages the main information about the engine state, window properties, timing, profiling, and various other configurations.
#define SH_ENGINE_MAX_SWAPCHAIN_IMAGE_COUNT 6 |
Maximum number of swapchain images in the engine.
#define SH_ENGINE_NOT_READY 0 |
Represents the engine not being ready.
#define SH_ENGINE_READY 1 |
Represents the engine being ready.
#define SH_ENGINE_RENDERPASS_ATTACHMENT_COUNT 3 |
Number of renderpass attachments in the engine.
#define SH_ENGINE_SUBPASS_COLOR_ATTACHMENT_COUNT 1 |
Number of color attachments in a subpass in the engine.
#define SH_ENGINE_SWAPCHAIN_IMAGE_COUNT 2 |
Number of swapchain images in the engine.
#define SH_FALSE 0 |
Boolean value representing false.
#define SH_TRUE 1 |
Boolean value representing true.
#define shApplicationError | ( | condition, | |
msg, | |||
failure_expression | |||
) | if ((int)(condition)) { printf("shapplication error: %s. \n", msg); failure_expression; } |
Generates an error message for the ShApplication.
condition | The condition to check. |
msg | The error message. |
failure_expression | The expression to execute in case of failure. |
#define shEngineError | ( | condition, | |
msg, | |||
failure_expression | |||
) | if ((int)(condition)) { printf("shengine error: %s.\n", msg); failure_expression; } |
Generates an error message for the shengine
module.
condition | The condition to check. |
msg | The error message. |
failure_expression | The expression to execute in case of failure. |
#define shFreeEngine | ( | p_engine | ) | free(p_engine); (p_engine) = NULL |
|
extern |
Allocates a profiling handle for the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Resizes the frame in the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Manages the state of the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
ready | State of the engine. |
|
extern |
Updates the profiling in the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Releases resources in the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Safely sets the state of the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Sets up Vulkan for the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Shuts down the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Updates the state of the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Releases Vulkan resources in the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Updates Vulkan in the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |
|
extern |
Resets the state of the shengine
module.
p_engine | Valid pointer to a ShEngine structure. |