#include <vgl/version.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
|
| enum | vgl_result {
VGL_RESULT_SUCCESS = 0
, VGL_RESULT_INCOMPLETE = 1
, VGL_RESULT_NOT_READY = 2
, VGL_RESULT_INVALID_ARGUMENT = -1
,
VGL_RESULT_OUT_OF_MEMORY = -2
, VGL_RESULT_NOT_SUPPORTED = -3
, VGL_RESULT_INVALID_OPERATION = -4
, VGL_RESULT_NOT_FOUND = -5
,
VGL_RESULT_IO_ERROR = -6
, VGL_RESULT_CORRUPT_DATA = -7
, VGL_RESULT_VERSION_MISMATCH = -8
, VGL_RESULT_CANCELLED = -9
,
VGL_RESULT_BACKEND_ERROR = -10
, VGL_RESULT_INTERNAL_ERROR = -11
, VGL_RESULT_MAX_ENUM = 0x7FFFFFFF
} |
| |
◆ VGL_API
◆ VGL_DEPRECATED
| #define VGL_DEPRECATED |
( |
|
message | ) |
|
◆ VGL_POINTER_PADDING
| #define VGL_POINTER_PADDING |
( |
|
name | ) |
uint32_t name; |
◆ VGL_FALSE
◆ VGL_TRUE
◆ VGL_SUCCEEDED
| #define VGL_SUCCEEDED |
( |
|
result | ) |
((result) >= 0) |
True for success and the non-error statuses.
◆ VGL_FAILED
| #define VGL_FAILED |
( |
|
result | ) |
((result) < 0) |
◆ vgl_bool
Boolean. Any non-zero value is true on input; the library writes exactly 0 or 1.
◆ vgl_result
Result code returned by every vgl function. Zero is success, positive values are non-error statuses and negative values are errors. Treat unknown negative codes as failures and unknown positive codes as success.
| Enumerator |
|---|
| VGL_RESULT_SUCCESS | The function succeeded.
|
| VGL_RESULT_INCOMPLETE | The function succeeded, but an output array was too small to hold all elements.
|
| VGL_RESULT_NOT_READY | The function succeeded, but the requested data is not loaded yet; the output holds the best available answer, as documented.
|
| VGL_RESULT_INVALID_ARGUMENT | An argument is null, out of range or otherwise invalid.
|
| VGL_RESULT_OUT_OF_MEMORY | An allocation failed, or a memory budget does not allow it.
|
| VGL_RESULT_NOT_SUPPORTED | The request is valid, but this build, backend or device does not support it.
|
| VGL_RESULT_INVALID_OPERATION | The function is not allowed in the current state of the object.
|
| VGL_RESULT_NOT_FOUND | A requested item, file or tile does not exist.
|
| VGL_RESULT_IO_ERROR | Reading data failed.
|
| VGL_RESULT_CORRUPT_DATA | Data was read but failed validation or decoding.
|
| VGL_RESULT_VERSION_MISMATCH | A pack, interface or structure version is not supported by this binary.
|
| VGL_RESULT_CANCELLED | An asynchronous operation was cancelled.
|
| VGL_RESULT_BACKEND_ERROR | A graphics API or engine call failed.
|
| VGL_RESULT_INTERNAL_ERROR | A bug in the library. Please report it.
|
| VGL_RESULT_MAX_ENUM | |
◆ vgl_result_name_get()
Gets the name of a result code, such as "VGL_RESULT_OUT_OF_MEMORY".
- Parameters
-
| result | The result code. |
| out_name | Receives a static string, valid for the lifetime of the process. For an unknown code this is "VGL_RESULT_UNKNOWN". |
- Return values
-
| VGL_RESULT_SUCCESS | The name was written. |
| VGL_RESULT_NOT_FOUND | The code is unknown; "VGL_RESULT_UNKNOWN" was written. |
| VGL_RESULT_INVALID_ARGUMENT | out_name is null. |
- Thread safety
- Free-threaded.
◆ vgl_version_get()
| vgl_result vgl_version_get |
( |
uint32_t * |
out_major, |
|
|
uint32_t * |
out_minor, |
|
|
uint32_t * |
out_patch |
|
) |
| |
Gets the version of the vgl binary, which may differ from the VGL_VERSION_* macros the caller was compiled against.
- Parameters
-
| out_major | Receives the major version. |
| out_minor | Receives the minor version. |
| out_patch | Receives the patch version. |
- Return values
-
| VGL_RESULT_SUCCESS | The version was written. |
| VGL_RESULT_INVALID_ARGUMENT | An output pointer is null. |
- Thread safety
- Free-threaded.