|
shengine pre-release
shengine by mrsinho
|
Handling environment descriptor functionalities in the shengine framework.
More...
#include <sys/types.h>#include <sys/stat.h>#include <stdio.h>#include <stdint.h>#include <smd/smd.h>#include <shvulkan/shVulkan.h>#include <shcomponents/shIdentity.h>#include <shcomponents/shCamera.h>#include <shcomponents/shTransform.h>Go to the source code of this file.
Data Structures | |
| struct | ShIniProperties |
| Structure representing properties related to the initialization (INI) file. More... | |
| struct | ShApplicationProperties |
| Structure representing properties related to the application. More... | |
| struct | ShHostMemoryProperties |
| Structure representing properties related to host memory. More... | |
| struct | ShVulkanMemoryProperties |
| Structure representing properties related to Vulkan memory. More... | |
| struct | ShSerialProperties |
| Structure representing properties related to serial communication. More... | |
| struct | ShSceneProperties |
| Structure representing properties related to the scene. More... | |
Macros | |
| #define | SH_ENVIRONMENT_STR512_LENGTH 64 |
| #define | SH_ENVIRONMENT_STR1024_LENGTH 128 |
| #define | SH_ENVIRONMENT_MAX_HOST_BUFFER_COUNT 2048 |
| #define | SH_ENVIRONMENT_MAX_VULKAN_BUFFER_COUNT 512 |
| #define | shGetFileStats(path, stats) stat(path, stats) |
| Macro to get file statistics. | |
| #define | shInitDescriptor(p_descriptor_handle) shGetFileStats((p_descriptor_handle)->path, &(p_descriptor_handle)->stats0) |
| Macro to initialize a descriptor handle. | |
| #define | shEnvironmentError(condition, msg, failure_expression) if ((int)(condition)) { printf("shenvironment error: %s.\n", msg); failure_expression; } |
| Macro for handling environment errors. | |
Typedefs | |
| typedef struct ShIniProperties | ShIniProperties |
| typedef struct ShApplicationProperties | ShApplicationProperties |
| typedef struct ShHostMemoryProperties | ShHostMemoryProperties |
| typedef struct ShVulkanMemoryProperties | ShVulkanMemoryProperties |
| typedef struct ShSerialProperties | ShSerialProperties |
| typedef struct ShSceneProperties | ShSceneProperties |
Functions | |
| uint8_t | shGetIniProperties (const char *ini_file_path, SmdFileHandle *p_ini_smd, ShIniProperties *p_ini_properties) |
| Function to get INI properties from a file. | |
| uint8_t | shGetApplicationProperties (const char *application_file_path, SmdFileHandle *p_application_smd, ShApplicationProperties *p_application_properties) |
| Function to get application properties from a file. | |
| uint8_t | shGetHostMemoryProperties (const char *card_inputs_file_path, SmdFileHandle *p_card_inputs_smd, ShHostMemoryProperties *p_card_inputs_properties) |
| Function to get host memory properties from a file. | |
| uint8_t | shGetVulkanMemoryProperties (const char *vulkan_memory_file_path, SmdFileHandle *p_vulkan_memory_smd, ShVulkanMemoryProperties *p_vulkan_memory_properties) |
| Function to get Vulkan memory properties from a file. | |
| uint8_t | shGetSerialProperties (const char *serial_file_path, SmdFileHandle *p_serial_smd, ShSerialProperties *p_serial_properties) |
| Retrieves serial properties from a specified file. | |
| uint8_t | shGetSceneProperties (const char *scene_file_path, SmdFileHandle *p_scene_smd, ShSceneProperties *p_scene_properties) |
| Retrieves scene properties from a specified file. | |
Handling environment descriptor functionalities in the shengine framework.
The shEnvironment.h file contains structures and functions related to handling environment descriptors in the shengine framework.
| #define SH_ENVIRONMENT_MAX_HOST_BUFFER_COUNT 2048 |
| #define SH_ENVIRONMENT_MAX_VULKAN_BUFFER_COUNT 512 |
| #define SH_ENVIRONMENT_STR1024_LENGTH 128 |
| #define SH_ENVIRONMENT_STR512_LENGTH 64 |
| #define shEnvironmentError | ( | condition, | |
| msg, | |||
| failure_expression | |||
| ) | if ((int)(condition)) { printf("shenvironment error: %s.\n", msg); failure_expression; } |
Macro for handling environment errors.
| condition | Condition to check. |
| msg | Error message. |
| failure_expression | Expression to execute in case of failure. |
| #define shGetFileStats | ( | path, | |
| stats | |||
| ) | stat(path, stats) |
Macro to get file statistics.
| path | File path. |
| stats | Pointer to a structure to store file statistics. |
| #define shInitDescriptor | ( | p_descriptor_handle | ) | shGetFileStats((p_descriptor_handle)->path, &(p_descriptor_handle)->stats0) |
Macro to initialize a descriptor handle.
| p_descriptor_handle | Valid pointer to a descriptor handle. |
| typedef struct ShApplicationProperties ShApplicationProperties |
| typedef struct ShHostMemoryProperties ShHostMemoryProperties |
| typedef struct ShIniProperties ShIniProperties |
| typedef struct ShSceneProperties ShSceneProperties |
| typedef struct ShSerialProperties ShSerialProperties |
| typedef struct ShVulkanMemoryProperties ShVulkanMemoryProperties |
|
extern |
Function to get application properties from a file.
This function retrieves application properties from the specified application file and initializes the corresponding structures.
| application_file_path | Path to the application file. |
| p_application_smd | Valid pointer to an SmdFileHandle structure for application properties. |
| p_application_properties | Pointer to the ShApplicationProperties structure to store the retrieved application properties. |
|
extern |
Function to get host memory properties from a file.
This function retrieves host memory properties from the specified card inputs file and initializes the corresponding structures.
| card_inputs_file_path | Path to the card inputs file. |
| p_card_inputs_smd | Pointer to an SmdFileHandle structure for host memory properties. |
| p_card_inputs_properties | Pointer to the ShHostMemoryProperties structure to store the retrieved host memory properties. |
|
extern |
Function to get INI properties from a file.
This function retrieves INI properties from the specified INI file and initializes the corresponding structures.
| ini_file_path | Path to the INI file. |
| p_ini_smd | Pointer to an SmdFileHandle structure for INI properties. |
| p_ini_properties | Pointer to the ShIniProperties structure to store the retrieved INI properties. |
|
extern |
Retrieves scene properties from a specified file.
| scene_file_path | Path to the scene file. |
| p_scene_smd | Valid pointer to an SmdFileHandle structure for the scene. |
| p_scene_properties | Valid pointer to an ShSceneProperties structure. |
|
extern |
Retrieves serial properties from a specified file.
| serial_file_path | Path to the serial file. |
| p_serial_smd | Valid pointer to an SmdFileHandle structure for serial. |
| p_serial_properties | Valid pointer to an ShSerialProperties structure. |
|
extern |
Function to get Vulkan memory properties from a file.
This function retrieves Vulkan memory properties from the specified Vulkan memory file and initializes the corresponding structures.
| vulkan_memory_file_path | Path to the Vulkan memory file. |
| p_vulkan_memory_smd | Pointer to an SmdFileHandle structure for Vulkan memory properties. |
| p_vulkan_memory_properties | Pointer to the ShVulkanMemoryProperties structure to store the retrieved Vulkan memory properties. |