[Bf-blender-cvs] [7f32601] master: PyAPI: update bgl to OpenGL 3.3

Martijn Berger noreply at git.blender.org
Fri Jul 24 08:55:47 CEST 2015


Commit: 7f326011596723ef2959f0715e345f9a4b8e76ad
Author: Martijn Berger
Date:   Fri Jul 24 16:43:20 2015 +1000
Branches: master
https://developer.blender.org/rB7f326011596723ef2959f0715e345f9a4b8e76ad

PyAPI: update bgl to OpenGL 3.3

Adds (currently unused) deprecated option
so we can remove support for older API versions.

===================================================================

M	source/blender/python/generic/bgl.c

===================================================================

diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index 700b821..e597855 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -88,19 +88,15 @@
 #define GLintP_ref(number)  &BGL_bufferType, &bgl_buffer##number
 #define GLintP_def(number)  Buffer *bgl_buffer##number
 
-#if 0
 #define GLint64P_str      "O!"
 #define GLint64P_var(number)  (bgl_buffer##number)->buf.asvoid
 #define GLint64P_ref(number)  &BGL_bufferType, &bgl_buffer##number
 #define GLint64P_def(number)  Buffer *bgl_buffer##number
-#endif
 
-#if 0
 #define GLenumP_str      "O!"
 #define GLenumP_var(number)  (bgl_buffer##number)->buf.asvoid
 #define GLenumP_ref(number)  &BGL_bufferType, &bgl_buffer##number
 #define GLenumP_def(number)  Buffer *bgl_buffer##number
-#endif
 
 #define GLuintP_str     "O!"
 #define GLuintP_var(number) (bgl_buffer##number)->buf.asvoid
@@ -134,10 +130,12 @@
 #define GLdoubleP_ref(number) &BGL_bufferType, &bgl_buffer##number
 #define GLdoubleP_def(number) Buffer *bgl_buffer##number
 
+#if 0
 #define GLclampfP_str     "O!"
 #define GLclampfP_var(number) (bgl_buffer##number)->buf.asvoid
 #define GLclampfP_ref(number) &BGL_bufferType, &bgl_buffer##number
 #define GLclampfP_def(number) Buffer *bgl_buffer##number
+#endif
 
 #define GLvoidP_str     "O!"
 #define GLvoidP_var(number) (bgl_buffer##number)->buf.asvoid
@@ -212,20 +210,16 @@
 #define GLsizei_def(num)    size_t GLsizei_var(num)
 
 /* typedef int GLsizeiptr; */
-#if 0
 #define GLsizeiptr_str       "n"
 #define GLsizeiptr_var(num)    bgl_var##num
 #define GLsizeiptr_ref(num)    &bgl_var##num
 #define GLsizeiptr_def(num)    size_t GLsizeiptr_var(num)
-#endif
 
 /* typedef int GLintptr; */
-#if 0
 #define GLintptr_str       "n"
 #define GLintptr_var(num)    bgl_var##num
 #define GLintptr_ref(num)    &bgl_var##num
 #define GLintptr_def(num)    size_t GLintptr_var(num)
-#endif
 
 /* typedef unsigned char GLubyte; */
 #define GLubyte_str       "B"
@@ -268,16 +262,20 @@
 #define GLfloat_def(num)    float GLfloat_var(num)
 
 /* typedef char *GLstring; */
+#if 0
 #define GLstring_str     "s"
 #define GLstring_var(number) bgl_var##number
 #define GLstring_ref(number) &bgl_var##number
 #define GLstring_def(number) char *GLstring_var(number)
+#endif
 
 /* typedef float GLclampf; */
+#if 0
 #define GLclampf_str      "f"
 #define GLclampf_var(num)   bgl_var##num
 #define GLclampf_ref(num)   &bgl_var##num
 #define GLclampf_def(num)   float GLclampf_var(num)
+#endif
 
 /* typedef double GLdouble; */
 #define GLdouble_str      "d"
@@ -286,10 +284,12 @@
 #define GLdouble_def(num)   double GLdouble_var(num)
 
 /* typedef double GLclampd; */
+#if 0
 #define GLclampd_str      "d"
 #define GLclampd_var(num)   bgl_var##num
 #define GLclampd_ref(num)   &bgl_var##num
 #define GLclampd_def(num)   double GLclampd_var(num)
+#endif
 
 #define _arg_def1(a1) \
                    a1##_def(1)
@@ -311,10 +311,8 @@
         _arg_def8(a1, a2, a3, a4, a5, a6, a7, a8); a9##_def(9)
 #define _arg_def10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
         _arg_def9(a1, a2, a3, a4, a5, a6, a7, a8, a9); a10##_def(10)
-#if 0
 #define _arg_def11(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \
         _arg_def10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); a11##_def(11)
-#endif
 #define  arg_def(...) VA_NARGS_CALL_OVERLOAD(_arg_def, __VA_ARGS__)
 
 #define _arg_var1(a1) \
@@ -337,10 +335,8 @@
         _arg_var8(a1, a2, a3, a4, a5, a6, a7, a8), a9##_var(9)
 #define _arg_var10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
         _arg_var9(a1, a2, a3, a4, a5, a6, a7, a8, a9), a10##_var(10)
-#if 0
 #define _arg_var11(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \
         _arg_var10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10), a11##_var(11)
-#endif
 #define  arg_var(...) VA_NARGS_CALL_OVERLOAD(_arg_var, __VA_ARGS__)
 
 #define _arg_ref1(a1) \
@@ -363,10 +359,8 @@
         _arg_ref8(a1, a2, a3, a4, a5, a6, a7, a8), a9##_ref(9)
 #define _arg_ref10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
         _arg_ref9(a1, a2, a3, a4, a5, a6, a7, a8, a9), a10##_ref(10)
-#if 0
 #define _arg_ref11(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \
         _arg_ref10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10), a11##_ref(11)
-#endif
 #define  arg_ref(...) VA_NARGS_CALL_OVERLOAD(_arg_ref, __VA_ARGS__)
 
 #define _arg_str1(a1) \
@@ -389,10 +383,8 @@
         _arg_str8(a1, a2, a3, a4, a5, a6, a7, a8) a9##_str
 #define _arg_str10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
         _arg_str9(a1, a2, a3, a4, a5, a6, a7, a8, a9) a10##_str
-#if 0
 #define _arg_str11(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \
         _arg_str10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) a11##_str
-#endif
 #define  arg_str(...) VA_NARGS_CALL_OVERLOAD(_arg_str, __VA_ARGS__)
 
 #define ret_def_void
@@ -1035,379 +1027,598 @@ static PyObject *Method_##funcname (PyObject *UNUSED(self), PyObject *args)   \
 	ret_ret_##ret;                                                            \
 }
 
-BGL_Wrap(Accum,          void,       (GLenum, GLfloat))
-BGL_Wrap(ActiveTexture,  void,       (GLenum))
-BGL_Wrap(AlphaFunc,      void,       (GLenum, GLclampf))
-BGL_Wrap(AreTexturesResident,  GLboolean,  (GLsizei, GLuintP, GLbooleanP))
-BGL_Wrap(AttachShader,   void,       (GLuint, GLuint))
-BGL_Wrap(Begin,          void,       (GLenum))
-BGL_Wrap(BindTexture,    void,       (GLenum, GLuint))
-BGL_Wrap(Bitmap,         void,       (GLsizei, GLsizei, GLfloat,
-                                      GLfloat, GLfloat, GLfloat, GLubyteP))
-BGL_Wrap(BlendFunc,        void,     (GLenum, GLenum))
-BGL_Wrap(CallList,         void,     (GLuint))
-BGL_Wrap(CallLists,        void,     (GLsizei, GLenum, GLvoidP))
-BGL_Wrap(Clear,            void,     (GLbitfield))
-BGL_Wrap(ClearAccum,       void,     (GLfloat, GLfloat, GLfloat, GLfloat))
-BGL_Wrap(ClearColor,       void,     (GLclampf, GLclampf, GLclampf, GLclampf))
-BGL_Wrap(ClearDepth,       void,     (GLclampd))
-BGL_Wrap(ClearIndex,       void,     (GLfloat))
-BGL_Wrap(ClearStencil,     void,     (GLint))
-BGL_Wrap(ClipPlane,        void,     (GLenum, GLdoubleP))
-BGL_Wrap(Color3b,          void,     (GLbyte, GLbyte, GLbyte))
-BGL_Wrap(Color3bv,         void,     (GLbyteP))
-BGL_Wrap(Color3d,          void,     (GLdouble, GLdouble, GLdouble))
-BGL_Wrap(Color3dv,         void,     (GLdoubleP))
-BGL_Wrap(Color3f,          void,     (GLfloat, GLfloat, GLfloat))
-BGL_Wrap(Color3fv,         void,     (GLfloatP))
-BGL_Wrap(Color3i,          void,     (GLint, GLint, GLint))
-BGL_Wrap(Color3iv,         void,     (GLintP))
-BGL_Wrap(Color3s,          void,     (GLshort, GLshort, GLshort))
-BGL_Wrap(Color3sv,         void,     (GLshortP))
-BGL_Wrap(Color3ub,         void,     (GLubyte, GLubyte, GLubyte))
-BGL_Wrap(Color3ubv,        void,     (GLubyteP))
-BGL_Wrap(Color3ui,         void,     (GLuint, GLuint, GLuint))
-BGL_Wrap(Color3uiv,        void,     (GLuintP))
-BGL_Wrap(Color3us,         void,     (GLushort, GLushort, GLushort))
-BGL_Wrap(Color3usv,        void,     (GLushortP))
-BGL_Wrap(Color4b,          void,     (GLbyte, GLbyte, GLbyte, GLbyte))
-BGL_Wrap(Color4bv,         void,     (GLbyteP))
-BGL_Wrap(Color4d,          void,     (GLdouble, GLdouble, GLdouble, GLdouble))
-BGL_Wrap(Color4dv,         void,     (GLdoubleP))
-BGL_Wrap(Color4f,          void,     (GLfloat, GLfloat, GLfloat, GLfloat))
-BGL_Wrap(Color4fv,         void,     (GLfloatP))
-BGL_Wrap(Color4i,          void,     (GLint, GLint, GLint, GLint))
-BGL_Wrap(Color4iv,         void,     (GLintP))
-BGL_Wrap(Color4s,          void,     (GLshort, GLshort, GLshort, GLshort))
-BGL_Wrap(Color4sv,         void,     (GLshortP))
-BGL_Wrap(Color4ub,         void,     (GLubyte, GLubyte, GLubyte, GLubyte))
-BGL_Wrap(Color4ubv,        void,     (GLubyteP))
-BGL_Wrap(Color4ui,         void,     (GLuint, GLuint, GLuint, GLuint))
-BGL_Wrap(Color4uiv,        void,     (GLuintP))
-BGL_Wrap(Color4us,         void,     (GLushort, GLushort, GLushort, GLushort))
-BGL_Wrap(Color4usv,        void,     (GLushortP))
-BGL_Wrap(ColorMask,        void,     (GLboolean, GLboolean, GLboolean, GLboolean))
-BGL_Wrap(ColorMaterial,    void,     (GLenum, GLenum))
-BGL_Wrap(CompileShader,    void,     (GLuint))
-BGL_Wrap(CopyPixels,       void,     (GLint, GLint, GLsizei, GLsizei, GLenum))
-BGL_Wrap(CopyTexImage2D,   void,     (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint))
-BGL_Wrap(CreateProgram,    GLuint,   (void))
-BGL_Wrap(CreateShader,     GLuint,   (GLenum))
-BGL_Wrap(CullFace,         void,     (GLenum))
-BGL_Wrap(DeleteLists,      void,     (GLuint, GLsizei))
-BGL_Wrap(DeleteProgram,    void,     (GLuint))
-BGL_Wrap(DeleteShader,     void,     (GLuint))
-BGL_Wrap(DeleteTextures,   void,     (GLsizei, GLuintP))
-BGL_Wrap(DepthFunc,        void,     (GLenum))
-BGL_Wrap(DepthMask,        void,     (GLboolean))
-BGL_Wrap(DepthRange,       void,     (GLclampd, GLclampd))
-BGL_Wrap(DetachShader,     void,     (GLuint, GLuint))
-BGL_Wrap(Disable,          void,     (GLenum))
-BGL_Wrap(DrawBuffer,       void,     (GLenum))
-BGL_Wrap(DrawPixels,       void,     (GLsizei, GLsizei, GLenum, GLenum, GLvoidP))
-BGL_Wrap(EdgeFlag,         void,     (GLboolean))
-BGL_Wrap(EdgeFlagv,        void,     (GLbooleanP))
-BGL_Wrap(Enable,           void,     (GLenum))
-BGL_Wrap(End,              void,     (void))
-BGL_Wrap(EndList,          void,     (void))
-BGL_Wrap(EvalCoord1d,      void,     (GLdouble))
-BGL_Wrap(EvalCoord1dv,     void,     (GLdoubleP))
-BGL_Wrap(EvalCoord1f,      void,     (GLfloat))
-BGL_Wrap(EvalCoord1fv,     void,     (GLfloatP))
-BGL_Wrap(EvalCoord2d,      void,     (GLdouble, GLdouble))
-BGL_Wrap(EvalCoord2dv,     void,     (GLdoubleP))
-BGL_Wrap(EvalCoord2f,      void,     (GLfloat, GLfloat))
-BGL_Wrap(EvalCoord2fv,     void,     (GLfloatP))
-BGL_Wrap(EvalMesh1,        void,     (GLenum, GLint, GLint))
-BGL_Wrap(EvalMesh2,        void,     (GLenum, GLint, GLint, GLint, GLint))
-BGL_Wrap(EvalPoint1,       void,     (GLint))
-BGL_Wrap(EvalPoint2,       void,     (GLint, GLint))
-BGL_Wrap(FeedbackBuffer,   void,     (GLsizei, GLenum, GLfloatP))
-BGL_Wrap(Finish,           void,     (void))
-BGL_Wrap(Flush,            void,     (void))
-BGL_Wrap(Fogf,     

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list