diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-03-28 14:20:26 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-03-28 14:20:26 +0400 |
commit | 822dcc48cd6c362ef0a154ae07c17137e9e33b76 (patch) | |
tree | 4f2b959f580c86927f139ba558086296d13acdf9 /source/blender/python/generic/bgl.c | |
parent | ddbb2bdaa57b69839e835c68c32086883a377560 (diff) |
bgl/BGE: glCopyTexImage2D + bgl.buffer creation error more verbose + dome post_draw (it draw only for the last overlayed scene)
1) glCopyTexImage2D - www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml
2) dome post_draw. Now dome mode can also use scene.post_draw. It only runs for the last scene. It's really useful. I'm working on a nice showcase for this (a dome visualizer for the dome mode running with bgl. In the mean time this is a (lame) example of both working together (the buffer is being copied and draw on top of the window):
http://blenderecia.orgfree.com/blender/tmp/dome_bgl_copytex2d.jpg
Diffstat (limited to 'source/blender/python/generic/bgl.c')
-rw-r--r-- | source/blender/python/generic/bgl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 2ca84f3a311..63c518c8721 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -355,7 +355,10 @@ static int Buffer_ass_slice(PyObject *self, int begin, int end, PyObject *seq) } if (PySequence_Length(seq)!=(end-begin)) { - PyErr_SetString(PyExc_TypeError, "size mismatch in assignment"); + int seq_len = PySequence_Length(seq); + char err_str[128]; + sprintf(err_str, "size mismatch in assignment. Expected size: %d (size provided: %d)", seq_len, (end-begin)); + PyErr_SetString(PyExc_TypeError, err_str); return -1; } @@ -476,6 +479,7 @@ BGL_Wrap(1, Color4usv, void, (GLushortP)) BGL_Wrap(4, ColorMask, void, (GLboolean, GLboolean, GLboolean, GLboolean)) BGL_Wrap(2, ColorMaterial, void, (GLenum, GLenum)) BGL_Wrap(5, CopyPixels, void, (GLint, GLint, GLsizei, GLsizei, GLenum)) +BGL_Wrap(8, CopyTexImage2D, void, (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) BGL_Wrap(1, CullFace, void, (GLenum)) BGL_Wrap(2, DeleteLists, void, (GLuint, GLsizei)) BGL_Wrap(2, DeleteTextures, void, (GLsizei, GLuintP)) @@ -819,6 +823,7 @@ static struct PyMethodDef BGL_methods[] = { MethodDef(ColorMask), MethodDef(ColorMaterial), MethodDef(CopyPixels), + MethodDef(CopyTexImage2D), MethodDef(CullFace), MethodDef(DeleteLists), MethodDef(DeleteTextures), |