Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2005-10-11 06:32:58 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2005-10-11 06:32:58 +0400
commitb970eadedfd9b70ba08a0c99e5f3fac3c31ec1e7 (patch)
treef8c2b04668ed3a951a98d8788d99fd49e9ff668e /source/blender/python/api2_2x/BGL.c
parent93a4f6a876108a4dbbcbdbb5be9f3d690519ab5b (diff)
Scripts:
- updating some bundled scripts, thanks to authors Jean-Michel Soler, Campbell Barton and Anthony D'Agostino. BPython: - removing wrong fix from BGL.c's glDrawPixels. note: applied guitargeek's setName patch to Blender.Key, but saw that he updated it with more functionality and assigned to stivs, so I won't commit this old version.
Diffstat (limited to 'source/blender/python/api2_2x/BGL.c')
-rw-r--r--source/blender/python/api2_2x/BGL.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/source/blender/python/api2_2x/BGL.c b/source/blender/python/api2_2x/BGL.c
index c22681a2e5d..165f9055057 100644
--- a/source/blender/python/api2_2x/BGL.c
+++ b/source/blender/python/api2_2x/BGL.c
@@ -423,33 +423,6 @@ static PyObject *Buffer_repr(PyObject *self)
return repr;
}
-/* Not a macro so that buffer dimensions are checked.
- * XXX There are other places where buffers are used, so a new macro to handle
- * all such cases may be a good idea. */
-static PyObject *Method_DrawPixels (PyObject *self, PyObject *args)
-{
- int bgl_var1, bgl_var2, bgl_var3, bgl_var4;
- Buffer *bgl_buffer5;
- int i, bufsize;
-
- if (!PyArg_ParseTuple(args, "i" "i" "i" "i" "O!",
- &bgl_var1, &bgl_var2, &bgl_var3, &bgl_var4, &buffer_Type, &bgl_buffer5))
- return NULL;
-
- bufsize = 1;
- for (i = 0; i < bgl_buffer5->ndimensions; i++)
- bufsize *= bgl_buffer5->dimensions[i];
-
- if (bgl_var1*bgl_var2 > bufsize)
- return EXPP_ReturnPyObjError(PyExc_AttributeError,
- "pixel buffer size can't be smaller than drawing rect area");
-
- glDrawPixels (bgl_var1, bgl_var2, bgl_var3, bgl_var4,
- (bgl_buffer5)->buf.asvoid);
-
- return EXPP_incr_ret(Py_None);
-}
-
BGL_Wrap(2, Accum, void, (GLenum, GLfloat))
BGL_Wrap(2, AlphaFunc, void, (GLenum, GLclampf))
@@ -511,7 +484,7 @@ BGL_Wrap(1, DepthMask, void, (GLboolean))
BGL_Wrap(2, DepthRange, void, (GLclampd, GLclampd))
BGL_Wrap(1, Disable, void, (GLenum))
BGL_Wrap(1, DrawBuffer, void, (GLenum))
-/*BGL_Wrap(5, DrawPixels, void, (GLsizei, GLsizei, GLenum, GLenum, GLvoidP))*/
+BGL_Wrap(5, DrawPixels, void, (GLsizei, GLsizei, GLenum, GLenum, GLvoidP))
BGL_Wrap(1, EdgeFlag, void, (GLboolean))
BGL_Wrap(1, EdgeFlagv, void, (GLbooleanP))
BGL_Wrap(1, Enable, void, (GLenum))