Blender  V2.93
bgl.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 PyObject *BPyInit_bgl(void);
24 
25 struct _Buffer *BGL_MakeBuffer(int type, int ndimensions, int *dimensions, void *initbuffer);
26 
27 int BGL_typeSize(int type);
28 
34 typedef struct _Buffer {
35  PyObject_VAR_HEAD
36  PyObject *parent;
37 
38  int type; /* GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT */
40  int *dimensions;
41 
42  union {
43  char *asbyte;
44  short *asshort;
45  int *asint;
46  float *asfloat;
47  double *asdouble;
48 
49  void *asvoid;
50  } buf;
52 
54 extern PyTypeObject BGL_bufferType;
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
struct _Buffer Buffer
PyObject * BPyInit_bgl(void)
Definition: bgl.c:2594
int BGL_typeSize(int type)
Definition: bgl.c:446
PyTypeObject BGL_bufferType
Definition: bgl.c:584
struct _Buffer * BGL_MakeBuffer(int type, int ndimensions, int *dimensions, void *initbuffer)
Definition: bgl.c:676
Definition: bgl.h:34
void * asvoid
Definition: bgl.h:49
char * asbyte
Definition: bgl.h:43
int type
Definition: bgl.h:38
short * asshort
Definition: bgl.h:44
int * asint
Definition: bgl.h:45
union _Buffer::@1118 buf
int ndimensions
Definition: bgl.h:39
int * dimensions
Definition: bgl.h:40
float * asfloat
Definition: bgl.h:46
double * asdouble
Definition: bgl.h:47
PyObject_VAR_HEAD PyObject * parent
Definition: bgl.h:36