Cleanup: Move some utilities to 'gpu_py.h'
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
|
||||
#include "../generic/python_utildefines.h"
|
||||
|
||||
#include "GPU_init_exit.h"
|
||||
|
||||
#include "gpu_py_matrix.h"
|
||||
#include "gpu_py_select.h"
|
||||
#include "gpu_py_state.h"
|
||||
@@ -39,24 +37,6 @@
|
||||
|
||||
#include "gpu_py_api.h" /* own include */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Utils to invalidate functions
|
||||
* \{ */
|
||||
|
||||
bool bpygpu_is_init_or_error(void)
|
||||
{
|
||||
if (!GPU_is_init()) {
|
||||
PyErr_SetString(PyExc_SystemError,
|
||||
"GPU functions for drawing are not available in background mode");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name GPU Module
|
||||
* \{ */
|
||||
|
Reference in New Issue
Block a user