[Bf-blender-cvs] [2117f7b] temp-python-bgl: Do away with EXPP_ prefix, has no meaning anymore
Campbell Barton
noreply at git.blender.org
Fri Jul 24 02:30:08 CEST 2015
Commit: 2117f7b63e62f9f1618b5479d45b237de00822c6
Author: Campbell Barton
Date: Fri Jul 24 10:24:29 2015 +1000
Branches: temp-python-bgl
https://developer.blender.org/rB2117f7b63e62f9f1618b5479d45b237de00822c6
Do away with EXPP_ prefix, has no meaning anymore
Use macros matching GPU module
===================================================================
M source/blender/python/generic/bgl.c
===================================================================
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index f72a6b1..9c120c2 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -1626,8 +1626,6 @@ BGLU_Wrap(PickMatrix, void, (GLdouble, GLdouble, GLdouble, GLdouble
BGLU_Wrap(Project, GLint, (GLdouble, GLdouble, GLdouble, GLdoubleP, GLdoubleP, GLintP, GLdoubleP, GLdoubleP, GLdoubleP))
BGLU_Wrap(UnProject, GLint, (GLdouble, GLdouble, GLdouble, GLdoubleP, GLdoubleP, GLintP, GLdoubleP, GLdoubleP, GLdoubleP))
-#undef MethodDef
-
/** \} */
@@ -1637,8 +1635,6 @@ BGLU_Wrap(UnProject, GLint, (GLdouble, GLdouble, GLdouble, GLdouble
* \{ */
#define MethodDefu(func) {"glu"#func, Method_##func, METH_VARARGS, NULL}
-/* So that MethodDefu(Accum) becomes:
- * {"glAccum", Method_Accumfunc, METH_VARARGS} */
static struct PyMethodDef BGL_methods[] = {
MethodDefu(Perspective),
@@ -1650,6 +1646,8 @@ static struct PyMethodDef BGL_methods[] = {
{NULL, NULL, 0, NULL}
};
+#undef MethodDefu
+
static struct PyModuleDef BGL_module_def = {
PyModuleDef_HEAD_INIT,
"bgl", /* m_name */
@@ -1662,7 +1660,7 @@ static struct PyModuleDef BGL_module_def = {
NULL, /* m_free */
};
-static void expp_addconst_int(PyObject *dict, const char *name, int value)
+static void py_module_dict_add_int(PyObject *dict, const char *name, int value)
{
PyObject *item;
PyDict_SetItemString(dict, name, item = PyLong_FromLong(value));
@@ -1701,7 +1699,7 @@ PyObject *BPyInit_bgl(void)
/* needed since some function pointers won't be NULL */
#pragma GCC diagnostic ignored "-Waddress"
-#define MethodAdd(func) \
+#define PY_MOD_ADD_METHOD(func) \
{ \
static PyMethodDef method_def = {"gl"#func, Method_##func, METH_VARARGS}; \
method_add_impl(submodule, dict, &method_def, (gl##func != NULL)); \
@@ -1709,1589 +1707,1588 @@ PyObject *BPyInit_bgl(void)
/* GL_VERSION_1_0 */
{
- MethodAdd(BlendFunc);
- MethodAdd(Clear);
- MethodAdd(ClearColor);
- MethodAdd(ClearDepth);
- MethodAdd(ClearStencil);
- MethodAdd(ColorMask);
- MethodAdd(CullFace);
- MethodAdd(DepthFunc);
- MethodAdd(DepthMask);
- MethodAdd(DepthRange);
- MethodAdd(Disable);
- MethodAdd(DrawBuffer);
- MethodAdd(Enable);
- MethodAdd(Finish);
- MethodAdd(Flush);
- MethodAdd(FrontFace);
- MethodAdd(GetBooleanv);
- MethodAdd(GetDoublev);
- MethodAdd(GetError);
- MethodAdd(GetFloatv);
- MethodAdd(GetIntegerv);
- MethodAdd(GetString);
- MethodAdd(GetTexImage);
- MethodAdd(GetTexLevelParameterfv);
- MethodAdd(GetTexLevelParameteriv);
- MethodAdd(GetTexParameterfv);
- MethodAdd(GetTexParameteriv);
- MethodAdd(Hint);
- MethodAdd(IsEnabled);
- MethodAdd(LineWidth);
- MethodAdd(LogicOp);
- MethodAdd(PixelStoref);
- MethodAdd(PixelStorei);
- MethodAdd(PointSize);
- MethodAdd(PolygonMode);
- MethodAdd(ReadBuffer);
- MethodAdd(ReadPixels);
- MethodAdd(Scissor);
- MethodAdd(StencilFunc);
- MethodAdd(StencilMask);
- MethodAdd(StencilOp);
- MethodAdd(TexImage1D);
- MethodAdd(TexImage2D);
- MethodAdd(TexParameterf);
- MethodAdd(TexParameterfv);
- MethodAdd(TexParameteri);
- MethodAdd(TexParameteriv);
- MethodAdd(Viewport);
+ PY_MOD_ADD_METHOD(BlendFunc);
+ PY_MOD_ADD_METHOD(Clear);
+ PY_MOD_ADD_METHOD(ClearColor);
+ PY_MOD_ADD_METHOD(ClearDepth);
+ PY_MOD_ADD_METHOD(ClearStencil);
+ PY_MOD_ADD_METHOD(ColorMask);
+ PY_MOD_ADD_METHOD(CullFace);
+ PY_MOD_ADD_METHOD(DepthFunc);
+ PY_MOD_ADD_METHOD(DepthMask);
+ PY_MOD_ADD_METHOD(DepthRange);
+ PY_MOD_ADD_METHOD(Disable);
+ PY_MOD_ADD_METHOD(DrawBuffer);
+ PY_MOD_ADD_METHOD(Enable);
+ PY_MOD_ADD_METHOD(Finish);
+ PY_MOD_ADD_METHOD(Flush);
+ PY_MOD_ADD_METHOD(FrontFace);
+ PY_MOD_ADD_METHOD(GetBooleanv);
+ PY_MOD_ADD_METHOD(GetDoublev);
+ PY_MOD_ADD_METHOD(GetError);
+ PY_MOD_ADD_METHOD(GetFloatv);
+ PY_MOD_ADD_METHOD(GetIntegerv);
+ PY_MOD_ADD_METHOD(GetString);
+ PY_MOD_ADD_METHOD(GetTexImage);
+ PY_MOD_ADD_METHOD(GetTexLevelParameterfv);
+ PY_MOD_ADD_METHOD(GetTexLevelParameteriv);
+ PY_MOD_ADD_METHOD(GetTexParameterfv);
+ PY_MOD_ADD_METHOD(GetTexParameteriv);
+ PY_MOD_ADD_METHOD(Hint);
+ PY_MOD_ADD_METHOD(IsEnabled);
+ PY_MOD_ADD_METHOD(LineWidth);
+ PY_MOD_ADD_METHOD(LogicOp);
+ PY_MOD_ADD_METHOD(PixelStoref);
+ PY_MOD_ADD_METHOD(PixelStorei);
+ PY_MOD_ADD_METHOD(PointSize);
+ PY_MOD_ADD_METHOD(PolygonMode);
+ PY_MOD_ADD_METHOD(ReadBuffer);
+ PY_MOD_ADD_METHOD(ReadPixels);
+ PY_MOD_ADD_METHOD(Scissor);
+ PY_MOD_ADD_METHOD(StencilFunc);
+ PY_MOD_ADD_METHOD(StencilMask);
+ PY_MOD_ADD_METHOD(StencilOp);
+ PY_MOD_ADD_METHOD(TexImage1D);
+ PY_MOD_ADD_METHOD(TexImage2D);
+ PY_MOD_ADD_METHOD(TexParameterf);
+ PY_MOD_ADD_METHOD(TexParameterfv);
+ PY_MOD_ADD_METHOD(TexParameteri);
+ PY_MOD_ADD_METHOD(TexParameteriv);
+ PY_MOD_ADD_METHOD(Viewport);
}
/* adding in GL_VERSION_1_0 removed from core profile */
if (use_deprecated == true) {
- MethodAdd(Accum);
- MethodAdd(AlphaFunc);
- MethodAdd(Begin);
- MethodAdd(Bitmap);
- MethodAdd(CallList);
- MethodAdd(CallLists);
- MethodAdd(ClearAccum);
- MethodAdd(ClearIndex);
- MethodAdd(ClipPlane);
- MethodAdd(Color3b);
- MethodAdd(Color3bv);
- MethodAdd(Color3d);
- MethodAdd(Color3dv);
- MethodAdd(Color3f);
- MethodAdd(Color3fv);
- MethodAdd(Color3i);
- MethodAdd(Color3iv);
- MethodAdd(Color3s);
- MethodAdd(Color3sv);
- MethodAdd(Color3ub);
- MethodAdd(Color3ubv);
- MethodAdd(Color3ui);
- MethodAdd(Color3uiv);
- MethodAdd(Color3us);
- MethodAdd(Color3usv);
- MethodAdd(Color4b);
- MethodAdd(Color4bv);
- MethodAdd(Color4d);
- MethodAdd(Color4dv);
- MethodAdd(Color4f);
- MethodAdd(Color4fv);
- MethodAdd(Color4i);
- MethodAdd(Color4iv);
- MethodAdd(Color4s);
- MethodAdd(Color4sv);
- MethodAdd(Color4ub);
- MethodAdd(Color4ubv);
- MethodAdd(Color4ui);
- MethodAdd(Color4uiv);
- MethodAdd(Color4us);
- MethodAdd(Color4usv);
- MethodAdd(ColorMaterial);
- MethodAdd(CopyPixels);
- MethodAdd(DeleteLists);
- MethodAdd(DrawPixels);
- MethodAdd(EdgeFlag);
- MethodAdd(EdgeFlagv);
- MethodAdd(End);
- MethodAdd(EndList);
- MethodAdd(EvalCoord1d);
- MethodAdd(EvalCoord1dv);
- MethodAdd(EvalCoord1f);
- MethodAdd(EvalCoord1fv);
- MethodAdd(EvalCoord2d);
- MethodAdd(EvalCoord2dv);
- MethodAdd(EvalCoord2f);
- MethodAdd(EvalCoord2fv);
- MethodAdd(EvalMesh1);
- MethodAdd(EvalMesh2);
- MethodAdd(EvalPoint1);
- MethodAdd(EvalPoint2);
- MethodAdd(FeedbackBuffer);
- MethodAdd(Fogf);
- MethodAdd(Fogfv);
- MethodAdd(Fogi);
- MethodAdd(Fogiv);
- MethodAdd(Frustum);
- MethodAdd(GenLists);
- MethodAdd(GetClipPlane);
- MethodAdd(GetLightfv);
- MethodAdd(GetLightiv);
- MethodAdd(GetMapdv);
- MethodAdd(GetMapfv);
- MethodAdd(GetMapiv);
- MethodAdd(GetMaterialfv);
- MethodAdd(GetMaterialiv);
- MethodAdd(GetPixelMapfv);
- MethodAdd(GetPixelMapuiv);
- MethodAdd(GetPixelMapusv);
- MethodAdd(GetPolygonStipple);
- MethodAdd(GetTexEnvfv);
- MethodAdd(GetTexEnviv);
- MethodAdd(GetTexGendv);
- MethodAdd(GetTexGenfv);
- MethodAdd(GetTexGeniv);
- MethodAdd(IndexMask);
- MethodAdd(Indexd);
- MethodAdd(Indexdv);
- MethodAdd(Indexf);
- MethodAdd(Indexfv);
- MethodAdd(Indexi);
- MethodAdd(Indexiv);
- MethodAdd(Indexs);
- MethodAdd(Indexsv);
- MethodAdd(InitNames);
- MethodAdd(IsList);
- MethodAdd(LightModelf);
- MethodAdd(LightModelfv);
- MethodAdd(LightModeli);
- MethodAdd(LightModeliv);
- MethodAdd(Lightf);
- MethodAdd(Lightfv);
- MethodAdd(Lighti);
- MethodAdd(Lightiv);
- MethodAdd(LineStipple);
- MethodAdd(ListBase);
- MethodAdd(LoadIdentity);
- MethodAdd(LoadMatrixd);
- MethodAdd(LoadMatrixf);
- MethodAdd(LoadName);
- MethodAdd(Map1d);
- MethodAdd(Map1f);
- MethodAdd(Map2d);
- MethodAdd(Map2f);
- MethodAdd(MapGrid1d);
- MethodAdd(MapGrid1f);
- MethodAdd(MapGrid2d);
- MethodAdd(MapGrid2f);
- MethodAdd(Materialf);
- MethodAdd(Materialfv);
- MethodAdd(Materiali);
- MethodAdd(Materialiv);
- MethodAdd(MatrixMode);
- MethodAdd(MultMatrixd);
- MethodAdd(MultMatrixf);
- MethodAdd(NewList);
- MethodAdd(Normal3b);
- MethodAdd(Normal3bv);
- MethodAdd(Normal3d);
- MethodAdd(Normal3dv);
- MethodAdd(Normal3f);
- MethodAdd(Normal3fv);
- MethodAdd(Normal3i);
- MethodAdd(Normal3iv);
- MethodAdd(Normal3s);
- MethodAdd(Normal3sv);
- MethodAdd(Ortho);
- MethodAdd(PassThrough);
- MethodAdd(PixelMapfv);
- MethodAdd(PixelMapuiv);
- MethodAdd(PixelMapusv);
- MethodAdd(PixelTransferf);
- MethodAdd(PixelTransferi);
- MethodAdd(PixelZoom);
- MethodAdd(PolygonStipple);
- MethodAdd(PopAttrib);
- MethodAdd(PopMatrix);
- MethodAdd(PopName);
- MethodAdd(PushAttrib);
- MethodAdd(PushMatrix);
- MethodAdd(PushName);
- MethodAdd(RasterPos2d);
- MethodAdd(RasterPos2dv);
- MethodAdd(RasterPos2f);
- MethodAdd(RasterPos2fv);
- MethodAdd(RasterPos2i);
- MethodAdd(RasterPos2iv);
- MethodAdd(RasterPos2s);
- MethodAdd(RasterPos2sv);
- MethodAdd(RasterPos3d);
- MethodAdd(RasterPos3dv);
- MethodAdd(RasterPos3f);
- MethodAdd(RasterPos3fv);
- MethodAdd(RasterPos3i);
- MethodAdd(RasterPos3iv);
- MethodAdd(RasterPos3s);
- MethodAdd(RasterPos3sv);
- MethodAdd(RasterPos4d);
- MethodAdd(RasterPos4dv);
- MethodAdd(RasterPos4f);
- MethodAdd(RasterPos4fv);
- MethodAdd(RasterPos4i);
- MethodAdd(RasterPos4iv);
- MethodAdd(RasterPos4s);
- MethodAdd(RasterPos4sv);
- MethodAdd(Rectd);
- MethodAdd(Rectdv);
- MethodAdd(Rectf);
- MethodAdd(Rectfv);
- MethodAdd(Recti);
- MethodAdd(Rectiv);
- MethodAdd(Rects);
- MethodAdd(Rectsv);
- MethodAdd(RenderMode);
- MethodAdd(Rotated);
- MethodAdd(Rotatef);
- MethodAdd(Scaled);
- MethodAdd(Scalef);
- MethodAdd(SelectBuffer);
- MethodAdd(ShadeModel);
- MethodAdd(TexCoord1d);
- MethodAdd(TexCoord1dv);
- MethodAdd(TexCoord1f);
- MethodAdd(TexCoord1fv);
- MethodAdd(TexCoord1i);
- MethodAdd(TexCoord1iv);
- MethodAdd(TexCoord1s);
- MethodAdd(TexCoord1sv);
- MethodAdd(TexCoord2d);
- MethodAdd(TexCoord2dv);
- MethodAdd(TexCoord2f);
- MethodAdd(TexCoord2fv);
- MethodAdd(TexCoord2i);
- MethodAdd(TexCoord2iv);
- MethodAdd(TexCoord2s);
- MethodAdd(TexCoord2sv);
- MethodAdd(TexCoord3d);
- MethodAdd(TexCoord3dv);
- MethodAdd(TexCoord3f);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list