From 00b29156e087bba3675c7247ffe64a1696a90558 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 20 Jul 2014 01:30:29 +1000 Subject: Defines: replace ELEM3-16 with ELEM(...), that can take varargs --- source/blender/python/generic/bgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/python/generic') diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 9b819977345..e77a528bb09 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -301,7 +301,7 @@ static PyObject *Buffer_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject if (!PyArg_ParseTuple(args, "iO|O: bgl.Buffer", &type, &length_ob, &init)) { return NULL; } - if (!ELEM5(type, GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT, GL_DOUBLE)) { + if (!ELEM(type, GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT, GL_DOUBLE)) { PyErr_SetString(PyExc_AttributeError, "invalid first argument type, should be one of " "GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT or GL_DOUBLE"); -- cgit v1.2.3 From 3e41c8ad6fd194c567471b39b88fddccc599a946 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 11 Aug 2014 20:58:42 +0600 Subject: Fix compilation error with debug scons The issue is that we've got hell with DEBUG and _DEBUG, theu're defined really inconsistent acros CMake and SCons. Used more reliable NDEBUG definition for IDP_spit. --- source/blender/python/generic/idprop_py_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/python/generic') diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index dcdda2c440e..8c9e84af8ed 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -1541,7 +1541,7 @@ PyObject *BPyInit_idprop(void) } -#ifdef DEBUG +#ifndef NDEBUG /* -------------------------------------------------------------------- */ /* debug only function */ -- cgit v1.2.3 From 85945a8b862dc7ff5a8938959242e08da5e1cadc Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 28 Aug 2014 12:19:44 +0200 Subject: Add debug information for maximum opengl limits in system info generation. --- source/blender/python/generic/bgl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/blender/python/generic') diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index e77a528bb09..b8dcf9d8491 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -1898,9 +1898,20 @@ PyObject *BPyInit_bgl(void) EXPP_ADDCONST(GL_TEXTURE7); EXPP_ADDCONST(GL_TEXTURE8); + EXPP_ADDCONST(GL_MAX_TEXTURE_UNITS); + EXPP_ADDCONST(GL_DEPTH_COMPONENT32); EXPP_ADDCONST(GL_TEXTURE_COMPARE_MODE); + EXPP_ADDCONST(GL_MAX_VARYING_FLOATS); + EXPP_ADDCONST(GL_MAX_VERTEX_ATTRIBS); + EXPP_ADDCONST(GL_MAX_VARYING_FLOATS); + EXPP_ADDCONST(GL_MAX_VERTEX_UNIFORM_COMPONENTS); + EXPP_ADDCONST(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS); + EXPP_ADDCONST(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS); + EXPP_ADDCONST(GL_MAX_TEXTURE_IMAGE_UNITS); + EXPP_ADDCONST(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS); + return submodule; } -- cgit v1.2.3