PyAPI: Add exceptions to stack push/pop
Raise exception when stack limits are reached.
This commit is contained in:
@@ -113,6 +113,16 @@ const float (*gpuGetNormalMatrixInverse(float m[3][3]))[3];
|
||||
void gpuBindMatrices(const Gwn_ShaderInterface*);
|
||||
bool gpuMatricesDirty(void); /* since last bind */
|
||||
|
||||
|
||||
/* Python API needs to be able to inspect the stack so errors raise exceptions instead of crashing. */
|
||||
#ifdef USE_GPU_PY_MATRIX_API
|
||||
int GPU_matrix_stack_level_get_model_view(void);
|
||||
int GPU_matrix_stack_level_get_projection(void);
|
||||
/* static assert ensures this doesn't change! */
|
||||
#define GPU_PY_MATRIX_STACK_LEN 31
|
||||
#endif /* USE_GPU_PY_MATRIX_API */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user