Cleanup: move bgl header to C++
This commit is contained in:
@@ -22,7 +22,7 @@ set(SRC
|
||||
py_capi_rna.cc
|
||||
py_capi_utils.cc
|
||||
|
||||
bgl.h
|
||||
bgl.hh
|
||||
bl_math_py_api.hh
|
||||
blf_py_api.hh
|
||||
idprop_py_api.hh
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <epoxy/gl.h>
|
||||
|
||||
#include "bgl.h"
|
||||
#include "bgl.hh"
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
|
||||
@@ -8,32 +8,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyObject *BPyInit_bgl(void);
|
||||
|
||||
/**
|
||||
* Create a buffer object
|
||||
*
|
||||
* \param dimensions: An array of ndimensions integers representing the size of each dimension.
|
||||
* \param initbuffer: When not NULL holds a contiguous buffer
|
||||
* with the correct format from which the buffer will be initialized
|
||||
*/
|
||||
struct _Buffer *BGL_MakeBuffer(int type,
|
||||
int ndimensions,
|
||||
const int *dimensions,
|
||||
const void *initbuffer);
|
||||
|
||||
int BGL_typeSize(int type);
|
||||
|
||||
/**
|
||||
* Buffer Object
|
||||
*
|
||||
* For Python access to OpenGL functions requiring a pointer.
|
||||
*/
|
||||
typedef struct _Buffer {
|
||||
struct Buffer {
|
||||
PyObject_VAR_HEAD
|
||||
PyObject *parent;
|
||||
|
||||
@@ -50,11 +30,23 @@ typedef struct _Buffer {
|
||||
|
||||
void *asvoid;
|
||||
} buf;
|
||||
} Buffer;
|
||||
};
|
||||
|
||||
/** The type object. */
|
||||
extern PyTypeObject BGL_bufferType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
PyObject *BPyInit_bgl();
|
||||
|
||||
/**
|
||||
* Create a buffer object
|
||||
*
|
||||
* \param dimensions: An array of ndimensions integers representing the size of each dimension.
|
||||
* \param initbuffer: When not NULL holds a contiguous buffer
|
||||
* with the correct format from which the buffer will be initialized
|
||||
*/
|
||||
struct Buffer *BGL_MakeBuffer(int type,
|
||||
int ndimensions,
|
||||
const int *dimensions,
|
||||
const void *initbuffer);
|
||||
|
||||
int BGL_typeSize(int type);
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
/* `inittab` initialization functions. */
|
||||
#include "../bmesh/bmesh_py_api.hh"
|
||||
#include "../generic/bgl.h"
|
||||
#include "../generic/bgl.hh"
|
||||
#include "../generic/bl_math_py_api.hh"
|
||||
#include "../generic/blf_py_api.hh"
|
||||
#include "../generic/idprop_py_api.hh"
|
||||
|
||||
Reference in New Issue
Block a user