Fix build without Python

This commit is contained in:
rdb 2016-10-31 20:14:48 +01:00
parent 59b0913b0b
commit ed761f2997
2 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,8 @@
#include "texture_ext.h"
#ifdef HAVE_PYTHON
#ifndef CPPPARSER
extern Dtool_PyTypedObject Dtool_PointerToArray_unsigned_char;
extern Dtool_PyTypedObject Dtool_ConstPointerToArray_unsigned_char;
@ -145,3 +147,5 @@ set_ram_image_as(PyObject *image, const string &provided_format) {
Dtool_Raise_ArgTypeError(image, 0, "Texture.set_ram_image_as", "CPTA_uchar or buffer");
}
#endif // HAVE_PYTHON

View File

@ -20,6 +20,8 @@
#include "py_panda.h"
#include "texture.h"
#ifdef HAVE_PYTHON
/**
* This class defines the extension methods for Texture, which are
* called instead of any C++ methods with the same prototype.
@ -32,6 +34,8 @@ public:
void set_ram_image_as(PyObject *image, const string &provided_format);
};
#endif // HAVE_PYTHON
#endif // CPPPARSER
#endif // TEXTURE_EXT_H