From 3cc88cd3046796687bc8b99d9839c6fc81916d00 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 11 Jun 2018 13:39:45 +0200 Subject: [PATCH 01/14] interrogate: clean up py_panda.h a bit more Inching towards reducing code in py_panda and eventually having no Python-specific code in interrogatedb anymore. --- .../interfaceMakerPythonNative.cxx | 42 +++--- dtool/src/interrogatedb/dtool_super_base.cxx | 6 +- dtool/src/interrogatedb/py_compat.cxx | 2 - dtool/src/interrogatedb/py_compat.h | 41 ++++- dtool/src/interrogatedb/py_panda.I | 31 ++++ dtool/src/interrogatedb/py_panda.cxx | 142 +----------------- dtool/src/interrogatedb/py_panda.h | 23 +-- dtool/src/pystub/pystub.cxx | 2 + 8 files changed, 105 insertions(+), 184 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 27151b8cbe..041b677d39 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -2536,7 +2536,7 @@ write_module_class(ostream &out, Object *obj) { } } - if (NeedsARichCompareFunction(obj->_itype)) { + if (NeedsARichCompareFunction(obj->_itype) || slots.count("tp_compare")) { out << "//////////////////\n"; out << "// A rich comparison function\n"; out << "// " << ClassName << "\n"; @@ -2547,7 +2547,6 @@ write_module_class(ostream &out, Object *obj) { out << " return nullptr;\n"; out << " }\n\n"; - out << " switch (op) {\n"; for (fi = obj->_methods.begin(); fi != obj->_methods.end(); ++fi) { std::set remaps; Function *func = (*fi); @@ -2564,21 +2563,28 @@ write_module_class(ostream &out, Object *obj) { } } const string &fname = func->_ifunc.get_name(); + const char *op_type; if (fname == "operator <") { - out << " case Py_LT:\n"; + op_type = "Py_LT"; } else if (fname == "operator <=") { - out << " case Py_LE:\n"; + op_type = "Py_LE"; } else if (fname == "operator ==") { - out << " case Py_EQ:\n"; + op_type = "Py_EQ"; } else if (fname == "operator !=") { - out << " case Py_NE:\n"; + op_type = "Py_NE"; } else if (fname == "operator >") { - out << " case Py_GT:\n"; + op_type = "Py_GT"; } else if (fname == "operator >=") { - out << " case Py_GE:\n"; + op_type = "Py_GE"; } else { continue; } + if (!has_local_richcompare) { + out << " switch (op) {\n"; + has_local_richcompare = true; + } + out << " case " << op_type << ":\n"; + out << " {\n"; string expected_params; @@ -2587,14 +2593,15 @@ write_module_class(ostream &out, Object *obj) { out << " break;\n"; out << " }\n"; - has_local_richcompare = true; } - out << " }\n\n"; - - out << " if (_PyErr_OCCURRED()) {\n"; - out << " PyErr_Clear();\n"; - out << " }\n\n"; + if (has_local_richcompare) { + // End of switch block + out << " }\n\n"; + out << " if (_PyErr_OCCURRED()) {\n"; + out << " PyErr_Clear();\n"; + out << " }\n\n"; + } if (slots.count("tp_compare")) { // A lot of Panda code depends on comparisons being done via the @@ -2624,6 +2631,7 @@ write_module_class(ostream &out, Object *obj) { out << " case Py_GE:\n"; out << " return PyBool_FromLong(cmpval >= 0);\n"; out << " }\n"; + has_local_richcompare = true; } out << " Py_INCREF(Py_NotImplemented);\n"; @@ -2850,7 +2858,7 @@ write_module_class(ostream &out, Object *obj) { out << "#else\n"; if (has_hash_compare) { write_function_slot(out, 4, slots, "tp_compare", - "&DTOOL_PyObject_ComparePointers"); + "&DtoolInstance_ComparePointers"); } else { out << " nullptr, // tp_compare\n"; } @@ -2880,7 +2888,7 @@ write_module_class(ostream &out, Object *obj) { // hashfunc tp_hash; if (has_hash_compare) { - write_function_slot(out, 4, slots, "tp_hash", "&DTOOL_PyObject_HashPointer"); + write_function_slot(out, 4, slots, "tp_hash", "&DtoolInstance_HashPointer"); } else { out << " nullptr, // tp_hash\n"; } @@ -2951,7 +2959,7 @@ write_module_class(ostream &out, Object *obj) { } else if (has_hash_compare) { // All hashable types need to be comparable. out << "#if PY_MAJOR_VERSION >= 3\n"; - out << " &DTOOL_PyObject_RichCompare,\n"; + out << " &DtoolInstance_RichComparePointers,\n"; out << "#else\n"; out << " nullptr, // tp_richcompare\n"; out << "#endif\n"; diff --git a/dtool/src/interrogatedb/dtool_super_base.cxx b/dtool/src/interrogatedb/dtool_super_base.cxx index d5197b3c76..9170af9d4f 100644 --- a/dtool/src/interrogatedb/dtool_super_base.cxx +++ b/dtool/src/interrogatedb/dtool_super_base.cxx @@ -79,13 +79,13 @@ EXPORT_THIS Dtool_PyTypedObject Dtool_DTOOL_SUPER_BASE = { #if PY_MAJOR_VERSION >= 3 nullptr, // tp_compare #else - &DTOOL_PyObject_ComparePointers, + &DtoolInstance_ComparePointers, #endif nullptr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping - &DTOOL_PyObject_HashPointer, + &DtoolInstance_HashPointer, nullptr, // tp_call nullptr, // tp_str PyObject_GenericGetAttr, @@ -96,7 +96,7 @@ EXPORT_THIS Dtool_PyTypedObject Dtool_DTOOL_SUPER_BASE = { nullptr, // tp_traverse nullptr, // tp_clear #if PY_MAJOR_VERSION >= 3 - &DTOOL_PyObject_RichCompare, + &DtoolInstance_RichComparePointers, #else nullptr, // tp_richcompare #endif diff --git a/dtool/src/interrogatedb/py_compat.cxx b/dtool/src/interrogatedb/py_compat.cxx index f0dd42cf73..0c1383f983 100644 --- a/dtool/src/interrogatedb/py_compat.cxx +++ b/dtool/src/interrogatedb/py_compat.cxx @@ -16,8 +16,6 @@ #ifdef HAVE_PYTHON -PyTupleObject Dtool_EmptyTuple = {PyVarObject_HEAD_INIT(nullptr, 0)}; - #if PY_MAJOR_VERSION < 3 /** * Given a long or int, returns a size_t, or raises an OverflowError if it is diff --git a/dtool/src/interrogatedb/py_compat.h b/dtool/src/interrogatedb/py_compat.h index 46537114aa..f87c73cf3d 100644 --- a/dtool/src/interrogatedb/py_compat.h +++ b/dtool/src/interrogatedb/py_compat.h @@ -138,11 +138,29 @@ typedef long Py_hash_t; /* Python 3.6 */ -// Used to implement _PyObject_CallNoArg -extern EXPCL_INTERROGATEDB PyTupleObject Dtool_EmptyTuple; - #ifndef _PyObject_CallNoArg -# define _PyObject_CallNoArg(func) PyObject_Call((func), (PyObject *)&Dtool_EmptyTuple, nullptr) +INLINE PyObject *_PyObject_CallNoArg(PyObject *func) { + static PyTupleObject empty_tuple = {PyVarObject_HEAD_INIT(nullptr, 0)}; +#ifdef Py_TRACE_REFS + _Py_AddToAllObjects((PyObject *)&empty_tuple, 0); +#endif + return PyObject_Call(func, (PyObject *)&empty_tuple, nullptr); +} +# define _PyObject_CallNoArg _PyObject_CallNoArg +#endif + +#ifndef _PyObject_FastCall +INLINE PyObject *_PyObject_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs) { + PyObject *tuple = PyTuple_New(nargs); + for (Py_ssize_t i = 0; i < nargs; ++i) { + PyTuple_SET_ITEM(tuple, i, args[i]); + Py_INCREF(args[i]); + } + PyObject *result = PyObject_Call(func, tuple, nullptr); + Py_DECREF(tuple); + return result; +} +# define _PyObject_FastCall _PyObject_FastCall #endif // Python versions before 3.6 didn't require longlong support to be enabled. @@ -161,6 +179,21 @@ extern EXPCL_INTERROGATEDB PyTupleObject Dtool_EmptyTuple; # define PyDict_GET_SIZE(mp) (((PyDictObject *)mp)->ma_used) #endif +#ifndef Py_RETURN_RICHCOMPARE +# define Py_RETURN_RICHCOMPARE(val1, val2, op) \ + do { \ + switch (op) { \ + NODEFAULT \ + case Py_EQ: if ((val1) == (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ + case Py_NE: if ((val1) != (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ + case Py_LT: if ((val1) < (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ + case Py_GT: if ((val1) > (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ + case Py_LE: if ((val1) <= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ + case Py_GE: if ((val1) >= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ + } \ + } while (0) +#endif + /* Other Python implementations */ // _PyErr_OCCURRED is an undocumented macro version of PyErr_Occurred. diff --git a/dtool/src/interrogatedb/py_panda.I b/dtool/src/interrogatedb/py_panda.I index 7ddf8bec9b..8f889768ea 100644 --- a/dtool/src/interrogatedb/py_panda.I +++ b/dtool/src/interrogatedb/py_panda.I @@ -62,6 +62,37 @@ DtoolInstance_GetPointer(PyObject *self, T *&into, Dtool_PyTypedObject &target_c return false; } +/** + * Function to create a hash from a wrapped Python object. + */ +INLINE Py_hash_t DtoolInstance_HashPointer(PyObject *self) { + if (self != nullptr && DtoolInstance_Check(self)) { + return (Py_hash_t)(intptr_t)DtoolInstance_VOID_PTR(self); + } + return -1; +} + +/** + * Python 2-style comparison function that compares objects by pointer. + */ +INLINE int DtoolInstance_ComparePointers(PyObject *v1, PyObject *v2) { + void *v1_this = DtoolInstance_Check(v1) ? DtoolInstance_VOID_PTR(v1) : nullptr; + void *v2_this = DtoolInstance_Check(v2) ? DtoolInstance_VOID_PTR(v2) : nullptr; + if (v1_this != nullptr && v2_this != nullptr) { + return (v1_this > v2_this) - (v1_this < v2_this); + } else { + return (v1 > v2) - (v1 < v2); + } +} + +/** + * Rich comparison function that compares objects by pointer. + */ +INLINE PyObject *DtoolInstance_RichComparePointers(PyObject *v1, PyObject *v2, int op) { + int cmpval = DtoolInstance_ComparePointers(v1, v2); + Py_RETURN_RICHCOMPARE(cmpval, 0, op); +} + /** * These functions wrap a pointer for a class that defines get_type_handle(). */ diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index 236c9a5197..becbedfa78 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -143,13 +143,6 @@ DTOOL_Call_GetPointerThisClass(PyObject *self, Dtool_PyTypedObject *classdef, return nullptr; } -void *DTOOL_Call_GetPointerThis(PyObject *self) { - if (self != nullptr && DtoolInstance_Check(self)) { - return DtoolInstance_VOID_PTR(self); - } - return nullptr; -} - /** * This is similar to a PyErr_Occurred() check, except that it also checks * Notify to see if an assertion has occurred. If that is the case, then it @@ -588,10 +581,6 @@ PyObject *Dtool_PyModuleInitHelper(LibraryDef *defs[], const char *modulename) { return Dtool_Raise_TypeError("PyType_Ready(Dtool_StaticProperty_Type)"); } -#ifdef Py_TRACE_REFS - _Py_AddToAllObjects((PyObject *)&Dtool_EmptyTuple, 0); -#endif - // Initialize the base class of everything. Dtool_PyModuleClassInit_DTOOL_SUPER_BASE(nullptr); } @@ -734,127 +723,6 @@ PyObject *Dtool_AddToDictionary(PyObject *self1, PyObject *args) { return Py_None; } -Py_hash_t DTOOL_PyObject_HashPointer(PyObject *self) { - if (self != nullptr && DtoolInstance_Check(self)) { - return (Py_hash_t)(intptr_t)DtoolInstance_VOID_PTR(self); - } - return -1; -} - -/* Compare v to w. Return - -1 if v < w or exception (PyErr_Occurred() true in latter case). - 0 if v == w. - 1 if v > w. - XXX The docs (C API manual) say the return value is undefined in case - XXX of error. -*/ - -int DTOOL_PyObject_ComparePointers(PyObject *v1, PyObject *v2) { - // try this compare - void *v1_this = DTOOL_Call_GetPointerThis(v1); - void *v2_this = DTOOL_Call_GetPointerThis(v2); - if (v1_this != nullptr && v2_this != nullptr) { // both are our types... - if (v1_this < v2_this) { - return -1; - } - if (v1_this > v2_this) { - return 1; - } - return 0; - } - - // ok self compare... - if (v1 < v2) { - return -1; - } - if (v1 > v2) { - return 1; - } - return 0; -} - -int DTOOL_PyObject_Compare(PyObject *v1, PyObject *v2) { - // First try compareTo function.. - PyObject * func = PyObject_GetAttrString(v1, "compare_to"); - if (func == nullptr) { - PyErr_Clear(); - } else { -#if PY_VERSION_HEX >= 0x03060000 - PyObject *res = _PyObject_FastCall(func, &v2, 1); -#else - PyObject *res = nullptr; - PyObject *args = PyTuple_Pack(1, v2); - if (args != nullptr) { - res = PyObject_Call(func, args, nullptr); - Py_DECREF(args); - } -#endif - Py_DECREF(func); - PyErr_Clear(); // just in case the function threw an error - // only use if the function returns an INT... hmm - if (res != nullptr) { - if (PyLong_Check(res)) { - long answer = PyLong_AsLong(res); - Py_DECREF(res); - - // Python really wants us to return strictly -1, 0, or 1. - if (answer < 0) { - return -1; - } else if (answer > 0) { - return 1; - } else { - return 0; - } - } -#if PY_MAJOR_VERSION < 3 - else if (PyInt_Check(res)) { - long answer = PyInt_AsLong(res); - Py_DECREF(res); - - // Python really wants us to return strictly -1, 0, or 1. - if (answer < 0) { - return -1; - } else if (answer > 0) { - return 1; - } else { - return 0; - } - } -#endif - Py_DECREF(res); - } - } - - return DTOOL_PyObject_ComparePointers(v1, v2); -} - -PyObject *DTOOL_PyObject_RichCompare(PyObject *v1, PyObject *v2, int op) { - int cmpval = DTOOL_PyObject_Compare(v1, v2); - bool result; - switch (op) { - NODEFAULT - case Py_LT: - result = (cmpval < 0); - break; - case Py_LE: - result = (cmpval <= 0); - break; - case Py_EQ: - result = (cmpval == 0); - break; - case Py_NE: - result = (cmpval != 0); - break; - case Py_GT: - result = (cmpval > 0); - break; - case Py_GE: - result = (cmpval >= 0); - break; - } - return PyBool_FromLong(result); -} - /** * This is a support function for a synthesized __copy__() method from a C++ * make_copy() method. @@ -875,15 +743,7 @@ PyObject *copy_from_make_copy(PyObject *self, PyObject *noargs) { */ PyObject *copy_from_copy_constructor(PyObject *self, PyObject *noargs) { PyObject *callable = (PyObject *)Py_TYPE(self); - -#if PY_VERSION_HEX >= 0x03060000 - PyObject *result = _PyObject_FastCall(callable, &self, 1); -#else - PyObject *args = PyTuple_Pack(1, self); - PyObject *result = PyObject_Call(callable, args, nullptr); - Py_DECREF(args); -#endif - return result; + return _PyObject_FastCall(callable, &self, 1); } /** diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index ed6d063e03..6feb2d6f70 100644 --- a/dtool/src/interrogatedb/py_panda.h +++ b/dtool/src/interrogatedb/py_panda.h @@ -195,8 +195,6 @@ EXPCL_INTERROGATEDB void DTOOL_Call_ExtractThisPointerForType(PyObject *self, Dt EXPCL_INTERROGATEDB void *DTOOL_Call_GetPointerThisClass(PyObject *self, Dtool_PyTypedObject *classdef, int param, const std::string &function_name, bool const_ok, bool report_errors); -EXPCL_INTERROGATEDB void *DTOOL_Call_GetPointerThis(PyObject *self); - EXPCL_INTERROGATEDB bool Dtool_Call_ExtractThisPointer(PyObject *self, Dtool_PyTypedObject &classdef, void **answer); EXPCL_INTERROGATEDB bool Dtool_Call_ExtractThisPointer_NonConst(PyObject *self, Dtool_PyTypedObject &classdef, @@ -205,6 +203,10 @@ EXPCL_INTERROGATEDB bool Dtool_Call_ExtractThisPointer_NonConst(PyObject *self, template INLINE bool DtoolInstance_GetPointer(PyObject *self, T *&into); template INLINE bool DtoolInstance_GetPointer(PyObject *self, T *&into, Dtool_PyTypedObject &classdef); +INLINE Py_hash_t DtoolInstance_HashPointer(PyObject *self); +INLINE int DtoolInstance_ComparePointers(PyObject *v1, PyObject *v2); +INLINE PyObject *DtoolInstance_RichComparePointers(PyObject *v1, PyObject *v2, int op); + // Functions related to error reporting. EXPCL_INTERROGATEDB bool _Dtool_CheckErrorOccurred(); @@ -331,21 +333,8 @@ EXPCL_INTERROGATEDB PyObject *Dtool_BorrowThisReference(PyObject *self, PyObject // some point.. EXPCL_INTERROGATEDB PyObject *Dtool_AddToDictionary(PyObject *self1, PyObject *args); - -EXPCL_INTERROGATEDB Py_hash_t DTOOL_PyObject_HashPointer(PyObject *obj); - -/* Compare v to w. Return - -1 if v < w or exception (PyErr_Occurred() true in latter case). - 0 if v == w. - 1 if v > w. - XXX The docs (C API manual) say the return value is undefined in case - XXX of error. -*/ - -EXPCL_INTERROGATEDB int DTOOL_PyObject_ComparePointers(PyObject *v1, PyObject *v2); -EXPCL_INTERROGATEDB int DTOOL_PyObject_Compare(PyObject *v1, PyObject *v2); - -EXPCL_INTERROGATEDB PyObject *DTOOL_PyObject_RichCompare(PyObject *v1, PyObject *v2, int op); +#define DTOOL_PyObject_HashPointer DtoolInstance_HashPointer +#define DTOOL_PyObject_ComparePointers DtoolInstance_ComparePointers EXPCL_INTERROGATEDB PyObject * copy_from_make_copy(PyObject *self, PyObject *noargs); diff --git a/dtool/src/pystub/pystub.cxx b/dtool/src/pystub/pystub.cxx index 91cad58115..cf617cd6f7 100644 --- a/dtool/src/pystub/pystub.cxx +++ b/dtool/src/pystub/pystub.cxx @@ -192,6 +192,7 @@ extern "C" { EXPCL_PYSTUB int _PyArg_Parse_SizeT(...); EXPCL_PYSTUB int _PyErr_BadInternalCall(...); EXPCL_PYSTUB int _PyLong_AsByteArray(...); + EXPCL_PYSTUB int _PyLong_Sign(...); EXPCL_PYSTUB int _PyObject_CallFunction_SizeT(...); EXPCL_PYSTUB int _PyObject_CallMethod_SizeT(...); EXPCL_PYSTUB int _PyObject_DebugFree(...); @@ -421,6 +422,7 @@ int _PyArg_ParseTupleAndKeywords_SizeT(...) { return 0; }; int _PyArg_Parse_SizeT(...) { return 0; }; int _PyErr_BadInternalCall(...) { return 0; }; int _PyLong_AsByteArray(...) { return 0; }; +int _PyLong_Sign(...) { return 0; }; int _PyObject_CallFunction_SizeT(...) { return 0; }; int _PyObject_CallMethod_SizeT(...) { return 0; }; int _PyObject_DebugFree(...) { return 0; }; From 1c476203fc1d74449fd1f2c78a0ed4ab2ad51a2d Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 11 Jun 2018 13:43:30 +0200 Subject: [PATCH 02/14] interrogate: remove Dtool_AddToDictionary (let me know if anyone uses this) If any code is relying on this, please let me know and I will add it back. It appears to be redundant, though, since one can access DtoolClassDict directly. Symbol kept around temporarily in order to keep ABI compatibility for a short while as people may not update their interrogate and Panda in sync, but it can soon be removed. --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 +- dtool/src/interrogatedb/py_panda.cxx | 2 +- dtool/src/interrogatedb/py_panda.h | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 041b677d39..e1867508c7 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -1459,7 +1459,7 @@ write_module_support(ostream &out, ostream *out_h, InterrogateModuleDef *def) { if (force_base_functions) { out << " // Support Function For Dtool_types ... for now in each module ??\n"; out << " {\"Dtool_BorrowThisReference\", &Dtool_BorrowThisReference, METH_VARARGS, \"Used to borrow 'this' pointer (to, from)\\nAssumes no ownership.\"},\n"; - out << " {\"Dtool_AddToDictionary\", &Dtool_AddToDictionary, METH_VARARGS, \"Used to add items into a tp_dict\"},\n"; + //out << " {\"Dtool_AddToDictionary\", &Dtool_AddToDictionary, METH_VARARGS, \"Used to add items into a tp_dict\"},\n"; } out << " {nullptr, nullptr, 0, nullptr}\n" << "};\n\n"; diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index becbedfa78..ee2966789f 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -704,7 +704,7 @@ PyObject *Dtool_BorrowThisReference(PyObject *self, PyObject *args) { // We do expose a dictionay for dtool classes .. this should be removed at // some point.. -PyObject *Dtool_AddToDictionary(PyObject *self1, PyObject *args) { +EXPCL_INTERROGATEDB PyObject *Dtool_AddToDictionary(PyObject *self1, PyObject *args) { PyObject *self; PyObject *subject; PyObject *key; diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index 6feb2d6f70..4025b965d5 100644 --- a/dtool/src/interrogatedb/py_panda.h +++ b/dtool/src/interrogatedb/py_panda.h @@ -329,10 +329,6 @@ EXPCL_INTERROGATEDB PyObject *Dtool_PyModuleInitHelper(LibraryDef *defs[], const // historical inharatence in the for of "is this instance of".. EXPCL_INTERROGATEDB PyObject *Dtool_BorrowThisReference(PyObject *self, PyObject *args); -// We do expose a dictionay for dtool classes .. this should be removed at -// some point.. -EXPCL_INTERROGATEDB PyObject *Dtool_AddToDictionary(PyObject *self1, PyObject *args); - #define DTOOL_PyObject_HashPointer DtoolInstance_HashPointer #define DTOOL_PyObject_ComparePointers DtoolInstance_ComparePointers From 494ba40c5edc6b333f2ff629f06e404a545e9e44 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 11 Jun 2018 14:35:37 +0200 Subject: [PATCH 03/14] Fix compilation error on Android --- panda/src/express/virtualFileMountAndroidAsset.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panda/src/express/virtualFileMountAndroidAsset.cxx b/panda/src/express/virtualFileMountAndroidAsset.cxx index b14edabb36..fa5fccece3 100644 --- a/panda/src/express/virtualFileMountAndroidAsset.cxx +++ b/panda/src/express/virtualFileMountAndroidAsset.cxx @@ -290,10 +290,10 @@ seekoff(streamoff off, ios_seekdir dir, ios_openmode which) { int whence; switch (dir) { - case ios_base::beg: + case std::ios_base::beg: whence = SEEK_SET; break; - case ios_base::cur: + case std::ios_base::cur: if (off == 0) { // Just requesting the current position, no need to void the buffer. return AAsset_seek(_asset, 0, SEEK_CUR) - n; @@ -305,7 +305,7 @@ seekoff(streamoff off, ios_seekdir dir, ios_openmode which) { } whence = SEEK_CUR; break; - case ios_base::end: + case std::ios_base::end: whence = SEEK_END; break; default: From ac4b8d1e1d3443ca16cc223799a5b13d44893c71 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 11 Jun 2018 14:53:25 +0200 Subject: [PATCH 04/14] Fix various compilation warnings --- contrib/src/rplight/iesDataset.cxx | 2 ++ contrib/src/rplight/pssmCameraRig.cxx | 2 ++ contrib/src/rplight/rpSpotLight.cxx | 2 ++ dtool/src/parser-inc/stdlib.h | 2 ++ pandatool/src/mayaprogs/mayaSavePview.cxx | 4 ++-- pandatool/src/mayaprogs/mayapath.cxx | 2 ++ 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/src/rplight/iesDataset.cxx b/contrib/src/rplight/iesDataset.cxx index 2975268138..34f5a8608e 100644 --- a/contrib/src/rplight/iesDataset.cxx +++ b/contrib/src/rplight/iesDataset.cxx @@ -27,7 +27,9 @@ #include "iesDataset.h" +#ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES +#endif #include NotifyCategoryDef(iesdataset, "") diff --git a/contrib/src/rplight/pssmCameraRig.cxx b/contrib/src/rplight/pssmCameraRig.cxx index b9560a80d2..8b8c22fd20 100644 --- a/contrib/src/rplight/pssmCameraRig.cxx +++ b/contrib/src/rplight/pssmCameraRig.cxx @@ -27,7 +27,9 @@ #include "pssmCameraRig.h" +#ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES +#endif #include #include "orthographicLens.h" diff --git a/contrib/src/rplight/rpSpotLight.cxx b/contrib/src/rplight/rpSpotLight.cxx index 649e0b1beb..3fd677a34c 100644 --- a/contrib/src/rplight/rpSpotLight.cxx +++ b/contrib/src/rplight/rpSpotLight.cxx @@ -27,7 +27,9 @@ #include "rpSpotLight.h" +#ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES +#endif #include diff --git a/dtool/src/parser-inc/stdlib.h b/dtool/src/parser-inc/stdlib.h index 5009b522b8..cb05992816 100644 --- a/dtool/src/parser-inc/stdlib.h +++ b/dtool/src/parser-inc/stdlib.h @@ -1,3 +1,5 @@ +#pragma once + #include #define EXIT_SUCCESS 0 diff --git a/pandatool/src/mayaprogs/mayaSavePview.cxx b/pandatool/src/mayaprogs/mayaSavePview.cxx index 423c7f09da..1537d95ce8 100644 --- a/pandatool/src/mayaprogs/mayaSavePview.cxx +++ b/pandatool/src/mayaprogs/mayaSavePview.cxx @@ -72,8 +72,8 @@ doIt(const MArgList &args) { #ifdef WIN32_VC // On Windows, we use the spawn function to run pview asynchronously. MString quoted = MString("\"") + filename + MString("\""); - int retval = _spawnlp(_P_DETACH, "pview", - "pview", pview_args.asChar(), quoted.asChar(), nullptr); + intptr_t retval = _spawnlp(_P_DETACH, "pview", + "pview", pview_args.asChar(), quoted.asChar(), nullptr); if (retval == -1) { return MS::kFailure; } diff --git a/pandatool/src/mayaprogs/mayapath.cxx b/pandatool/src/mayaprogs/mayapath.cxx index a82411efe9..cac021eebe 100644 --- a/pandatool/src/mayaprogs/mayapath.cxx +++ b/pandatool/src/mayaprogs/mayapath.cxx @@ -43,7 +43,9 @@ #include #if defined(_WIN32) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #else #include From 4fe7fe4c88aaf5f69fa0f9f7e1ecc3a31eece760 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 12 Jun 2018 11:08:02 +0200 Subject: [PATCH 05/14] interrogate: fix int8_t / signed char range checking on Android --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index e1867508c7..6c652bb806 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -5046,7 +5046,7 @@ write_function_instance(ostream &out, FunctionRemap *remap, "value %ld out of range for unsigned byte", param_name); } else { - extra_convert << "if (" << param_name << " < CHAR_MIN || " << param_name << " > CHAR_MAX) {\n"; + extra_convert << "if (" << param_name << " < SCHAR_MIN || " << param_name << " > SCHAR_MAX) {\n"; error_raise_return(extra_convert, 2, return_flags, "OverflowError", "value %ld out of range for signed byte", param_name); From fa23c199eca853836b093d46272d70c872d1624c Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 12 Jun 2018 11:08:52 +0200 Subject: [PATCH 06/14] makepanda: fix faulty error when immediately pressing Ctrl+C --- makepanda/makepanda.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 1b49826a8f..df25c49f39 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -15,9 +15,11 @@ try: import queue else: import Queue as queue +except KeyboardInterrupt: + raise except: print("You are either using an incomplete or an old version of Python!") - print("Please install the development package of Python 2.x and try again.") + print("Please install the development package of Python and try again.") exit(1) from makepandacore import * From b88bd9970464ebda498e96bab08f7403757da7fa Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 12 Jun 2018 11:09:26 +0200 Subject: [PATCH 07/14] Various compiler warning fixes --- .../interfaceMakerPythonNative.cxx | 20 ------------------- panda/src/char/characterSlider.h | 1 + panda/src/display/nativeWindowHandle.h | 2 +- panda/src/egg/eggCompositePrimitive.cxx | 8 ++++---- panda/src/egg/eggPrimitive.cxx | 8 +++----- panda/src/egg/eggTriangleFan.cxx | 2 +- panda/src/egg2pg/eggSaver.cxx | 4 ++-- panda/src/event/asyncTaskSequence.I | 2 +- panda/src/event/asyncTaskSequence.h | 4 ++-- .../glstuff/glGraphicsStateGuardian_src.cxx | 2 +- .../src/glstuff/glGraphicsStateGuardian_src.h | 2 +- panda/src/grutil/meshDrawer.cxx | 2 +- panda/src/grutil/movieTexture.cxx | 11 ++++++++++ panda/src/grutil/movieTexture.h | 3 +++ panda/src/movies/dr_flac.h | 2 ++ panda/src/pgraph/geomTransformer.cxx | 2 +- panda/src/pgraph/nodePathCollection.cxx | 6 +++--- panda/src/pgraph/nodePathCollection.h | 4 ++-- panda/src/pgraphnodes/shaderGenerator.cxx | 5 +++++ panda/src/text/textAssembler.cxx | 4 ++-- panda/src/tinydisplay/ztriangle.h | 2 +- panda/src/tinydisplay/ztriangle_two.h | 14 ++++++------- 22 files changed, 55 insertions(+), 55 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 6c652bb806..c040f0dc6c 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -103,11 +103,6 @@ RenameSet methodRenameDictionary[] = { { nullptr, nullptr, -1 } }; -RenameSet classRenameDictionary[] = { - // No longer used, now empty. - { nullptr, nullptr, -1 } -}; - const char *pythonKeywords[] = { "and", "as", @@ -193,12 +188,6 @@ classNameFromCppName(const std::string &cppName, bool mangle) { } } - for (int x = 0; classRenameDictionary[x]._from != nullptr; x++) { - if (cppName == classRenameDictionary[x]._from) { - className = classRenameDictionary[x]._to; - } - } - if (className.empty()) { std::string text = "** ERROR ** Renaming class: " + cppName + " to empty string"; printf("%s", text.c_str()); @@ -253,15 +242,6 @@ methodNameFromCppName(const std::string &cppName, const std::string &className, } } - if (className.size() > 0) { - string lookup_name = className + '.' + cppName; - for (int x = 0; classRenameDictionary[x]._from != nullptr; x++) { - if (lookup_name == methodRenameDictionary[x]._from) { - methodName = methodRenameDictionary[x]._to; - } - } - } - // # Mangle names that happen to be python keywords so they are not anymore methodName = checkKeyword(methodName); return methodName; diff --git a/panda/src/char/characterSlider.h b/panda/src/char/characterSlider.h index 3c347af12b..9871095afd 100644 --- a/panda/src/char/characterSlider.h +++ b/panda/src/char/characterSlider.h @@ -34,6 +34,7 @@ PUBLISHED: explicit CharacterSlider(PartGroup *parent, const std::string &name); virtual ~CharacterSlider(); +public: virtual PartGroup *make_copy() const; virtual bool update_internals(PartBundle *root, PartGroup *parent, diff --git a/panda/src/display/nativeWindowHandle.h b/panda/src/display/nativeWindowHandle.h index 1ee6fec43a..14bab98815 100644 --- a/panda/src/display/nativeWindowHandle.h +++ b/panda/src/display/nativeWindowHandle.h @@ -33,7 +33,7 @@ * This class exists for name scoping only. Don't use the constructor * directly; use one of the make_* methods. */ -class EXPCL_PANDA_DISPLAY NativeWindowHandle : public WindowHandle { +class EXPCL_PANDA_DISPLAY NativeWindowHandle final : public WindowHandle { private: INLINE NativeWindowHandle(); INLINE NativeWindowHandle(const NativeWindowHandle ©); diff --git a/panda/src/egg/eggCompositePrimitive.cxx b/panda/src/egg/eggCompositePrimitive.cxx index b42cb080c9..94c4b1d625 100644 --- a/panda/src/egg/eggCompositePrimitive.cxx +++ b/panda/src/egg/eggCompositePrimitive.cxx @@ -57,7 +57,7 @@ get_shading() const { if (!first_component->has_normal()) { first_component = this; } - for (int i = 1; i < get_num_components(); i++) { + for (size_t i = 1; i < get_num_components(); ++i) { const EggAttributes *component = get_component(i); if (!component->has_normal()) { component = this; @@ -74,7 +74,7 @@ get_shading() const { if (!first_component->has_color()) { first_component = this; } - for (int i = 1; i < get_num_components(); i++) { + for (size_t i = 1; i < get_num_components(); ++i) { const EggAttributes *component = get_component(i); if (!component->has_color()) { component = this; @@ -295,7 +295,7 @@ apply_last_attribute() { // The first component gets applied to the third vertex, and so on from // there. int num_lead_vertices = get_num_lead_vertices(); - for (int i = 0; i < get_num_components(); i++) { + for (size_t i = 0; i < get_num_components(); ++i) { EggAttributes *component = get_component(i); do_apply_flat_attribute(i + num_lead_vertices, component); } @@ -313,7 +313,7 @@ void EggCompositePrimitive:: apply_first_attribute() { // The first component gets applied to the first vertex, and so on from // there. - for (int i = 0; i < get_num_components(); i++) { + for (size_t i = 0; i < get_num_components(); ++i) { EggAttributes *component = get_component(i); do_apply_flat_attribute(i, component); } diff --git a/panda/src/egg/eggPrimitive.cxx b/panda/src/egg/eggPrimitive.cxx index ad0b464c30..ee35080416 100644 --- a/panda/src/egg/eggPrimitive.cxx +++ b/panda/src/egg/eggPrimitive.cxx @@ -227,7 +227,7 @@ get_shading() const { if (!first_vertex->has_normal()) { first_vertex = this; } - for (int i = 1; i < get_num_vertices(); i++) { + for (size_t i = 1; i < get_num_vertices(); ++i) { const EggAttributes *vertex = get_vertex(i); if (!vertex->has_normal()) { vertex = this; @@ -244,7 +244,7 @@ get_shading() const { if (!first_vertex->has_color()) { first_vertex = this; } - for (int i = 1; i < get_num_vertices(); i++) { + for (size_t i = 1; i < get_num_vertices(); ++i) { const EggAttributes *vertex = get_vertex(i); if (!vertex->has_color()) { vertex = this; @@ -461,9 +461,7 @@ apply_first_attribute() { void EggPrimitive:: post_apply_flat_attribute() { if (!empty()) { - for (int i = 0; i < (int)size(); i++) { - EggVertex *vertex = get_vertex(i); - + for (EggVertex *vertex : _vertices) { // Use set_normal() instead of copy_normal(), to avoid getting the // morphs--we don't want them here, since we're just putting a bogus // value on the normal anyway. diff --git a/panda/src/egg/eggTriangleFan.cxx b/panda/src/egg/eggTriangleFan.cxx index 30d441286a..6ad3b4f5ae 100644 --- a/panda/src/egg/eggTriangleFan.cxx +++ b/panda/src/egg/eggTriangleFan.cxx @@ -57,7 +57,7 @@ apply_first_attribute() { // In the case of a triangle fan, the first vertex of the fan is the common // vertex, so we consider the second vertex to be the key vertex of the // first triangle, and move from there. - for (int i = 0; i < get_num_components(); i++) { + for (size_t i = 0; i < get_num_components(); ++i) { EggAttributes *component = get_component(i); do_apply_flat_attribute(i + 1, component); } diff --git a/panda/src/egg2pg/eggSaver.cxx b/panda/src/egg2pg/eggSaver.cxx index b54b6df744..af70617e36 100644 --- a/panda/src/egg2pg/eggSaver.cxx +++ b/panda/src/egg2pg/eggSaver.cxx @@ -560,7 +560,7 @@ convert_collision_node(CollisionNode *node, const WorkingNodePath &node_path, // Get an arbitrary vector on the plane by taking the cross product // with any vector, as long as it is different. LVector3 vec1; - if (abs(normal[2]) > abs(normal[1])) { + if (std::fabs(normal[2]) > std::fabs(normal[1])) { vec1 = normal.cross(LVector3(0, 1, 0)); } else { vec1 = normal.cross(LVector3(0, 0, 1)); @@ -626,7 +626,7 @@ convert_collision_node(CollisionNode *node, const WorkingNodePath &node_path, // Also get an arbitrary vector perpendicular to the tube. LVector3 axis = point_b - point_a; LVector3 sideways; - if (abs(axis[2]) > abs(axis[1])) { + if (std::fabs(axis[2]) > std::fabs(axis[1])) { sideways = axis.cross(LVector3(0, 1, 0)); } else { sideways = axis.cross(LVector3(0, 0, 1)); diff --git a/panda/src/event/asyncTaskSequence.I b/panda/src/event/asyncTaskSequence.I index 28d94f2f75..332303df7a 100644 --- a/panda/src/event/asyncTaskSequence.I +++ b/panda/src/event/asyncTaskSequence.I @@ -34,7 +34,7 @@ get_repeat_count() const { * Returns the index of the task within the sequence that is currently being * executed (or that will be executed at the next epoch). */ -INLINE int AsyncTaskSequence:: +INLINE size_t AsyncTaskSequence:: get_current_task_index() const { return _task_index; } diff --git a/panda/src/event/asyncTaskSequence.h b/panda/src/event/asyncTaskSequence.h index 3d1c4cc450..096d1f6b88 100644 --- a/panda/src/event/asyncTaskSequence.h +++ b/panda/src/event/asyncTaskSequence.h @@ -39,7 +39,7 @@ PUBLISHED: INLINE void set_repeat_count(int repeat_count); INLINE int get_repeat_count() const; - INLINE int get_current_task_index() const; + INLINE size_t get_current_task_index() const; protected: virtual bool is_runnable(); @@ -51,7 +51,7 @@ private: void set_current_task(AsyncTask *task, bool clean_exit); int _repeat_count; - int _task_index; + size_t _task_index; PT(AsyncTask) _current_task; public: diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 6c06ae0b6b..1e4c2bb530 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -3007,7 +3007,7 @@ reset() { #ifndef OPENGLES_1 _enabled_vertex_attrib_arrays.clear(); - memset(_vertex_attrib_divisors, 0, sizeof(GLint) * 32); + memset(_vertex_attrib_divisors, 0, sizeof(GLuint) * 32); #endif // Dither is on by default in GL; let's turn it off diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 5c29d4bcad..c0f75a21d5 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -661,7 +661,7 @@ protected: #ifndef OPENGLES_1 BitMask32 _enabled_vertex_attrib_arrays; - GLint _vertex_attrib_divisors[32]; + GLuint _vertex_attrib_divisors[32]; PT(Shader) _current_shader; ShaderContext *_current_shader_context; diff --git a/panda/src/grutil/meshDrawer.cxx b/panda/src/grutil/meshDrawer.cxx index a727c15ced..b87380d3b8 100644 --- a/panda/src/grutil/meshDrawer.cxx +++ b/panda/src/grutil/meshDrawer.cxx @@ -374,7 +374,7 @@ void MeshDrawer::geometry(NodePath draw_node) { CPT(GeomVertexData) v_data = geom->get_vertex_data(); GeomVertexReader *prim_vertex_reader = new GeomVertexReader(v_data, "vertex"); GeomVertexReader *prim_uv_reader = new GeomVertexReader(v_data, "texcoord"); - for(int k=0; k get_num_primitives(); k++) { + for (size_t k = 0; k < geom->get_num_primitives(); ++k) { CPT(GeomPrimitive) prim1 = geom->get_primitive(k); CPT(GeomPrimitive) _prim = prim1->decompose(); diff --git a/panda/src/grutil/movieTexture.cxx b/panda/src/grutil/movieTexture.cxx index c62eb23715..44f3d541d4 100644 --- a/panda/src/grutil/movieTexture.cxx +++ b/panda/src/grutil/movieTexture.cxx @@ -288,6 +288,17 @@ do_load_one(Texture::CData *cdata_tex, return false; } +/** + * Loading a static image into a MovieTexture is an error. + */ +bool MovieTexture:: +do_load_one(Texture::CData *cdata_tex, + const PfmFile &pfm, const std::string &name, int z, int n, + const LoaderOptions &options) { + grutil_cat.error() << "You cannot load a static image into a MovieTexture\n"; + return false; +} + /** * Called internally by do_reconsider_z_size() to allocate new memory in * _ram_images[0] for the new number of pages. diff --git a/panda/src/grutil/movieTexture.h b/panda/src/grutil/movieTexture.h index c1721f4320..1a49c885b1 100644 --- a/panda/src/grutil/movieTexture.h +++ b/panda/src/grutil/movieTexture.h @@ -102,6 +102,9 @@ protected: virtual bool do_load_one(Texture::CData *cdata, const PNMImage &pnmimage, const std::string &name, int z, int n, const LoaderOptions &options); + virtual bool do_load_one(Texture::CData *cdata, + const PfmFile &pfm, const std::string &name, + int z, int n, const LoaderOptions &options); bool do_load_one(Texture::CData *cdata, PT(MovieVideoCursor) color, PT(MovieVideoCursor) alpha, int z, const LoaderOptions &options); diff --git a/panda/src/movies/dr_flac.h b/panda/src/movies/dr_flac.h index fdac6a2f79..3d0b1cdd91 100644 --- a/panda/src/movies/dr_flac.h +++ b/panda/src/movies/dr_flac.h @@ -328,7 +328,9 @@ static drflac* drflac_open_memory(const void* data, size_t dataSize); #endif #ifdef __linux__ +#ifndef _BSD_SOURCE #define _BSD_SOURCE +#endif #include #endif diff --git a/panda/src/pgraph/geomTransformer.cxx b/panda/src/pgraph/geomTransformer.cxx index c77fc35e28..e21327b304 100644 --- a/panda/src/pgraph/geomTransformer.cxx +++ b/panda/src/pgraph/geomTransformer.cxx @@ -1242,7 +1242,7 @@ apply_collect_changes() { */ void GeomTransformer::NewCollectedData:: append_vdata(const GeomVertexData *vdata, int vertex_offset) { - for (int i = 0; i < vdata->get_num_arrays(); ++i) { + for (size_t i = 0; i < vdata->get_num_arrays(); ++i) { PT(GeomVertexArrayDataHandle) new_handle = _new_data->modify_array_handle(i); CPT(GeomVertexArrayDataHandle) old_handle = vdata->get_array_handle(i); size_t stride = (size_t)_new_format->get_array(i)->get_stride(); diff --git a/panda/src/pgraph/nodePathCollection.cxx b/panda/src/pgraph/nodePathCollection.cxx index 68977a8b4b..8f29f07f22 100644 --- a/panda/src/pgraph/nodePathCollection.cxx +++ b/panda/src/pgraph/nodePathCollection.cxx @@ -188,8 +188,8 @@ get_path(int index) const { * get_path(), but it may be a more convenient way to access it. */ NodePath NodePathCollection:: -operator [] (int index) const { - nassertr(index >= 0 && index < (int)_node_paths.size(), NodePath()); +operator [] (size_t index) const { + nassertr(index < _node_paths.size(), NodePath()); return _node_paths[index]; } @@ -198,7 +198,7 @@ operator [] (int index) const { * Returns the number of paths in the collection. This is the same thing as * get_num_paths(). */ -int NodePathCollection:: +size_t NodePathCollection:: size() const { return _node_paths.size(); } diff --git a/panda/src/pgraph/nodePathCollection.h b/panda/src/pgraph/nodePathCollection.h index 64a16d63c3..6dd4e76b12 100644 --- a/panda/src/pgraph/nodePathCollection.h +++ b/panda/src/pgraph/nodePathCollection.h @@ -45,8 +45,8 @@ PUBLISHED: int get_num_paths() const; NodePath get_path(int index) const; MAKE_SEQ(get_paths, get_num_paths, get_path); - NodePath operator [] (int index) const; - int size() const; + NodePath operator [] (size_t index) const; + size_t size() const; INLINE void operator += (const NodePathCollection &other); INLINE NodePathCollection operator + (const NodePathCollection &other) const; diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index af4410aea2..bdca5406ce 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -404,6 +404,9 @@ analyze_renderstate(ShaderKey &key, const RenderState *rs) { info._flags |= ShaderKey::TF_uses_last_saved_result; } break; + + default: + break; } // In fact, perhaps this stage should be disabled altogether? @@ -438,6 +441,8 @@ analyze_renderstate(ShaderKey &key, const RenderState *rs) { skip = true; } break; + default: + break; } // We can't just drop a disabled slot from the list, since then the // indices for the texture stages will no longer match up. So we keep it, diff --git a/panda/src/text/textAssembler.cxx b/panda/src/text/textAssembler.cxx index c427be8c79..e59b83a100 100644 --- a/panda/src/text/textAssembler.cxx +++ b/panda/src/text/textAssembler.cxx @@ -2381,7 +2381,7 @@ assign_append_to(GeomCollectorMap &geom_collector_map, PT(Geom) geom = _glyph->get_geom(GeomEnums::UH_static); - int p, sp, s, e, i; + int sp, s, e, i; const GeomVertexData *vdata = geom->get_vertex_data(); CPT(RenderState) rs = _glyph->get_state()->compose(state); @@ -2398,7 +2398,7 @@ assign_append_to(GeomCollectorMap &geom_collector_map, // that we don't needlessly duplicate vertices into our output vertex data. VertexIndexMap vimap; - for (p = 0; p < geom->get_num_primitives(); p++) { + for (size_t p = 0; p < geom->get_num_primitives(); ++p) { CPT(GeomPrimitive) primitive = geom->get_primitive(p)->decompose(); // Get a new GeomPrimitive of the corresponding type. diff --git a/panda/src/tinydisplay/ztriangle.h b/panda/src/tinydisplay/ztriangle.h index 9b2db10f2d..daa035dc75 100644 --- a/panda/src/tinydisplay/ztriangle.h +++ b/panda/src/tinydisplay/ztriangle.h @@ -14,7 +14,7 @@ int error, derror; int x1, dxdy_min, dxdy_max; /* warning: x2 is multiplied by 2^16 */ - int x2, dx2dy2; + UNUSED int x2, dx2dy2; #ifdef INTERP_Z int z1 = 0, dzdx = 0, dzdy = 0, dzdl_min = 0, dzdl_max = 0; diff --git a/panda/src/tinydisplay/ztriangle_two.h b/panda/src/tinydisplay/ztriangle_two.h index b8baba23c2..49c4550b4a 100644 --- a/panda/src/tinydisplay/ztriangle_two.h +++ b/panda/src/tinydisplay/ztriangle_two.h @@ -32,7 +32,7 @@ FNAME(flat_untextured) (ZBuffer *zb, ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2) { UNUSED int color; - int or0, og0, ob0, oa0; + UNUSED int or0, og0, ob0, oa0; #define INTERP_Z @@ -160,7 +160,7 @@ FNAME(flat_textured) (ZBuffer *zb, ZBufferPoint *p0,ZBufferPoint *p1,ZBufferPoint *p2) { ZTextureDef *texture_def; - int or0, og0, ob0, oa0; + UNUSED int or0, og0, ob0, oa0; #define INTERP_Z #define INTERP_ST @@ -399,7 +399,7 @@ FNAME(flat_perspective) (ZBuffer *zb, { ZTextureDef *texture_def; PN_stdfloat fdzdx,fndzdx,ndszdx,ndtzdx; - int or0, og0, ob0, oa0; + UNUSED int or0, og0, ob0, oa0; #define INTERP_Z #define INTERP_STZ @@ -456,7 +456,7 @@ FNAME(flat_perspective) (ZBuffer *zb, PIXEL *pp; \ int s,t,z,zz; \ int n,dsdx,dtdx; \ - int or1,og1,ob1,oa1; \ + UNUSED int or1,og1,ob1,oa1; \ PN_stdfloat sz,tz,fz,zinv; \ n=(x2>>16)-x1; \ fz=(PN_stdfloat)z1; \ @@ -596,7 +596,7 @@ FNAME(smooth_perspective) (ZBuffer *zb, PIXEL *pp; \ int s,t,z,zz; \ int n,dsdx,dtdx; \ - int or1,og1,ob1,oa1; \ + UNUSED int or1,og1,ob1,oa1; \ PN_stdfloat sz,tz,fz,zinv; \ n=(x2>>16)-x1; \ fz=(PN_stdfloat)z1; \ @@ -727,7 +727,7 @@ FNAME(smooth_multitex2) (ZBuffer *zb, PIXEL *pp; \ int s,t,sa,ta,z,zz; \ int n,dsdx,dtdx,dsadx,dtadx; \ - int or1,og1,ob1,oa1; \ + UNUSED int or1,og1,ob1,oa1; \ PN_stdfloat sz,tz,sza,tza,fz,zinv; \ n=(x2>>16)-x1; \ fz=(PN_stdfloat)z1; \ @@ -888,7 +888,7 @@ FNAME(smooth_multitex3) (ZBuffer *zb, PIXEL *pp; \ int s,t,sa,ta,sb,tb,z,zz; \ int n,dsdx,dtdx,dsadx,dtadx,dsbdx,dtbdx; \ - int or1,og1,ob1,oa1; \ + UNUSED int or1,og1,ob1,oa1; \ PN_stdfloat sz,tz,sza,tza,szb,tzb,fz,zinv; \ n=(x2>>16)-x1; \ fz=(PN_stdfloat)z1; \ From 65217a258d63830f374145f928444a81e47f5a69 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 12 Jun 2018 12:45:48 +0200 Subject: [PATCH 08/14] tform: allow calling MouseWatcher::add_region with same region twice Previously, this was an error. Now, it will simply silently be ignored, making it behave more like a set. --- panda/src/tform/mouseWatcherBase.cxx | 65 ++++++++++++++-------------- panda/src/tform/mouseWatcherBase.h | 9 ++-- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/panda/src/tform/mouseWatcherBase.cxx b/panda/src/tform/mouseWatcherBase.cxx index 820fb81d90..2a167e57c5 100644 --- a/panda/src/tform/mouseWatcherBase.cxx +++ b/panda/src/tform/mouseWatcherBase.cxx @@ -40,34 +40,31 @@ MouseWatcherBase:: } /** - * Adds the indicated region to the set of regions in the group. It is an - * error to add the same region to the set more than once. + * Adds the indicated region to the set of regions in the group. It is no + * longer an error to call this for the same region more than once. */ void MouseWatcherBase:: -add_region(MouseWatcherRegion *region) { - PT(MouseWatcherRegion) pt = region; - +add_region(PT(MouseWatcherRegion) region) { LightMutexHolder holder(_lock); - // We will only bother to check for duplicates in the region list if we are - // building a development Panda. The overhead for doing this may be too - // high if we have many regions. -#ifdef _DEBUG - // See if the region is in the setvector already - Regions::const_iterator ri = - find(_regions.begin(), _regions.end(), pt); - nassertv(ri == _regions.end()); -#endif // _DEBUG - #ifndef NDEBUG // Also add it to the vizzes if we have them. - if (_show_regions) { - nassertv(_vizzes.size() == _regions.size()); - _vizzes.push_back(make_viz_region(pt)); + if (UNLIKELY(_show_regions)) { + // We need to check whether it is already in the set, so that we don't + // create a duplicate viz. + Regions::const_iterator ri = + std::find(_regions.begin(), _regions.end(), region); + + if (ri == _regions.end()) { + nassertv(_vizzes.size() == _regions.size()); + _vizzes.push_back(make_viz_region(region)); + } else { + return; + } } #endif // NDEBUG - _regions.push_back(pt); + _regions.push_back(std::move(region)); _sorted = false; } @@ -111,9 +108,7 @@ MouseWatcherRegion *MouseWatcherBase:: find_region(const string &name) const { LightMutexHolder holder(_lock); - Regions::const_iterator ri; - for (ri = _regions.begin(); ri != _regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + for (MouseWatcherRegion *region : _regions) { if (region->get_name() == name) { return region; } @@ -162,10 +157,13 @@ is_sorted() const { /** * Returns the number of regions in the group. */ -int MouseWatcherBase:: +size_t MouseWatcherBase:: get_num_regions() const { LightMutexHolder holder(_lock); - + if (!_sorted) { + // Remove potential duplicates to get an accurate count. + ((MouseWatcherBase *)this)->do_sort_regions(); + } return _regions.size(); } @@ -175,9 +173,12 @@ get_num_regions() const { * removed the nth region before you called this method. */ MouseWatcherRegion *MouseWatcherBase:: -get_region(int n) const { +get_region(size_t n) const { LightMutexHolder holder(_lock); - if (n >= 0 && n < (int)_regions.size()) { + if (!_sorted) { + ((MouseWatcherBase *)this)->do_sort_regions(); + } + if (n < _regions.size()) { return _regions[n]; } return nullptr; @@ -198,9 +199,7 @@ void MouseWatcherBase:: write(ostream &out, int indent_level) const { LightMutexHolder holder(_lock); - Regions::const_iterator ri; - for (ri = _regions.begin(); ri != _regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + for (MouseWatcherRegion *region : _regions) { region->write(out, indent_level); } } @@ -345,13 +344,15 @@ do_update_regions() { nassertv(_lock.debug_is_locked()); if (_show_regions) { + // Make sure we have no duplicates. + do_sort_regions(); + _show_regions_root.node()->remove_all_children(); _vizzes.clear(); _vizzes.reserve(_regions.size()); - Regions::const_iterator ri; - for (ri = _regions.begin(); ri != _regions.end(); ++ri) { - _vizzes.push_back(make_viz_region(*ri)); + for (MouseWatcherRegion *region : _regions) { + _vizzes.push_back(make_viz_region(region)); } } } diff --git a/panda/src/tform/mouseWatcherBase.h b/panda/src/tform/mouseWatcherBase.h index f3b53c2ec2..f20bca0cc5 100644 --- a/panda/src/tform/mouseWatcherBase.h +++ b/panda/src/tform/mouseWatcherBase.h @@ -21,6 +21,7 @@ #include "pvector.h" #include "nodePath.h" #include "lightMutex.h" +#include "ordered_vector.h" /** * This represents a collection of MouseWatcherRegions that may be managed as @@ -34,7 +35,7 @@ public: virtual ~MouseWatcherBase(); PUBLISHED: - void add_region(MouseWatcherRegion *region); + void add_region(PT(MouseWatcherRegion) region); bool has_region(MouseWatcherRegion *region) const; bool remove_region(MouseWatcherRegion *region); MouseWatcherRegion *find_region(const std::string &name) const; @@ -44,8 +45,8 @@ PUBLISHED: bool is_sorted() const; MAKE_PROPERTY(sorted, is_sorted); - int get_num_regions() const; - MouseWatcherRegion *get_region(int n) const; + size_t get_num_regions() const; + MouseWatcherRegion *get_region(size_t n) const; MAKE_SEQ(get_regions, get_num_regions, get_region); MAKE_SEQ_PROPERTY(regions, get_num_regions, get_region); @@ -73,7 +74,7 @@ protected: #endif // NDEBUG protected: - typedef pvector< PT(MouseWatcherRegion) > Regions; + typedef ov_set< PT(MouseWatcherRegion) > Regions; Regions _regions; bool _sorted; From eab8b1c7a354e85e0b669e7f32d3ed795fbe2627 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 12 Jun 2018 13:42:14 +0200 Subject: [PATCH 09/14] tform: MouseWatcher sort should uniquify duplicates Also change the code to use range-for when appropriate, which improves code readability. --- panda/src/tform/mouseWatcher.cxx | 118 +++++++++++++-------------- panda/src/tform/mouseWatcherBase.I | 32 ++++++++ panda/src/tform/mouseWatcherBase.cxx | 21 +---- panda/src/tform/mouseWatcherBase.h | 6 +- tests/tform/test_mousewatcher.py | 18 ++++ 5 files changed, 112 insertions(+), 83 deletions(-) create mode 100644 panda/src/tform/mouseWatcherBase.I create mode 100644 tests/tform/test_mousewatcher.py diff --git a/panda/src/tform/mouseWatcher.cxx b/panda/src/tform/mouseWatcher.cxx index eac710d414..67dbee8591 100644 --- a/panda/src/tform/mouseWatcher.cxx +++ b/panda/src/tform/mouseWatcher.cxx @@ -491,11 +491,13 @@ output(ostream &out) const { LightMutexHolder holder(_lock); DataNode::output(out); - int count = _regions.size(); - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); - count += group->_regions.size(); + if (!_sorted) { + ((MouseWatcher *)this)->do_sort_regions(); + } + + size_t count = _regions.size(); + for (MouseWatcherGroup *group : _groups) { + count += group->get_num_regions(); } out << " (" << count << " regions)"; @@ -511,14 +513,10 @@ write(ostream &out, int indent_level) const { MouseWatcherBase::write(out, indent_level + 2); LightMutexHolder holder(_lock); - if (!_groups.empty()) { - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); - indent(out, indent_level + 2) - << "Subgroup:\n"; - group->write(out, indent_level + 4); - } + for (MouseWatcherGroup *group : _groups) { + indent(out, indent_level + 2) + << "Subgroup:\n"; + group->write(out, indent_level + 4); } } @@ -540,9 +538,12 @@ get_over_regions(MouseWatcher::Regions ®ions, const LPoint2 &pos) const { // Ensure the vector is empty before we begin. regions.clear(); - Regions::const_iterator ri; - for (ri = _regions.begin(); ri != _regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + // Make sure there are no duplicates in the regions vector. + if (!_sorted) { + ((MouseWatcher *)this)->do_sort_regions(); + } + + for (MouseWatcherRegion *region : _regions) { const LVecBase4 &frame = region->get_frame(); if (region->get_active() && @@ -554,11 +555,10 @@ get_over_regions(MouseWatcher::Regions ®ions, const LPoint2 &pos) const { } // Also check all of our sub-groups. - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); - for (ri = group->_regions.begin(); ri != group->_regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + for (MouseWatcherGroup *group : _groups) { + group->sort_regions(); + + for (MouseWatcherRegion *region : group->_regions) { const LVecBase4 &frame = region->get_frame(); if (region->get_active() && @@ -750,9 +750,7 @@ do_show_regions(const NodePath &render2d, const string &bin_name, _show_regions_bin_name = bin_name; _show_regions_draw_order = draw_order; - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); + for (MouseWatcherGroup *group : _groups) { group->show_regions(render2d, bin_name, draw_order); } } @@ -770,9 +768,7 @@ do_hide_regions() { _show_regions_bin_name = string(); _show_regions_draw_order = 0; - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); + for (MouseWatcherGroup *group : _groups) { group->hide_regions(); } } @@ -1026,15 +1022,17 @@ keystroke(int keycode) { param.set_modifier_buttons(_mods); param.set_mouse(_mouse); + // Make sure there are no duplicates in the regions vector. + if (!_sorted) { + ((MouseWatcher *)this)->do_sort_regions(); + } + // Keystrokes go to all those regions that want keyboard events, regardless // of which is the "preferred" region (that is, without respect to the mouse // position). However, we do set the outside flag according to whether the // given region is the preferred region or not. - Regions::const_iterator ri; - for (ri = _regions.begin(); ri != _regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); - + for (MouseWatcherRegion *region : _regions) { if (region->get_keyboard()) { param.set_outside(region != _preferred_region); region->keystroke(param); @@ -1043,12 +1041,10 @@ keystroke(int keycode) { } // Also check all of our sub-groups. - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); - for (ri = group->_regions.begin(); ri != group->_regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + for (MouseWatcherGroup *group : _groups) { + group->sort_regions(); + for (MouseWatcherRegion *region : group->_regions) { if (region->get_keyboard()) { param.set_outside(region != _preferred_region); region->keystroke(param); @@ -1072,13 +1068,15 @@ candidate(const wstring &candidate_string, size_t highlight_start, param.set_modifier_buttons(_mods); param.set_mouse(_mouse); + // Make sure there are no duplicates in the regions vector. + if (!_sorted) { + ((MouseWatcher *)this)->do_sort_regions(); + } + // Candidate strings go to all those regions that want keyboard events, // exactly like keystrokes, above. - Regions::const_iterator ri; - for (ri = _regions.begin(); ri != _regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); - + for (MouseWatcherRegion *region : _regions) { if (region->get_keyboard()) { param.set_outside(region != _preferred_region); region->candidate(param); @@ -1086,12 +1084,10 @@ candidate(const wstring &candidate_string, size_t highlight_start, } // Also check all of our sub-groups. - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); - for (ri = group->_regions.begin(); ri != group->_regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + for (MouseWatcherGroup *group : _groups) { + group->sort_regions(); + for (MouseWatcherRegion *region : group->_regions) { if (region->get_keyboard()) { param.set_outside(region != _preferred_region); region->candidate(param); @@ -1109,10 +1105,12 @@ void MouseWatcher:: global_keyboard_press(const MouseWatcherParameter ¶m) { nassertv(_lock.debug_is_locked()); - Regions::const_iterator ri; - for (ri = _regions.begin(); ri != _regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + // Make sure there are no duplicates in the regions vector. + if (!_sorted) { + ((MouseWatcher *)this)->do_sort_regions(); + } + for (MouseWatcherRegion *region : _regions) { if (region != _preferred_region && region->get_keyboard()) { region->press(param); consider_keyboard_suppress(region); @@ -1120,12 +1118,10 @@ global_keyboard_press(const MouseWatcherParameter ¶m) { } // Also check all of our sub-groups. - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); - for (ri = group->_regions.begin(); ri != group->_regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + for (MouseWatcherGroup *group : _groups) { + group->sort_regions(); + for (MouseWatcherRegion *region : group->_regions) { if (region != _preferred_region && region->get_keyboard()) { region->press(param); consider_keyboard_suppress(region); @@ -1142,22 +1138,22 @@ void MouseWatcher:: global_keyboard_release(const MouseWatcherParameter ¶m) { nassertv(_lock.debug_is_locked()); - Regions::const_iterator ri; - for (ri = _regions.begin(); ri != _regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + // Make sure there are no duplicates in the regions vector. + if (!_sorted) { + ((MouseWatcher *)this)->do_sort_regions(); + } + for (MouseWatcherRegion *region : _regions) { if (region != _preferred_region && region->get_keyboard()) { region->release(param); } } // Also check all of our sub-groups. - Groups::const_iterator gi; - for (gi = _groups.begin(); gi != _groups.end(); ++gi) { - MouseWatcherGroup *group = (*gi); - for (ri = group->_regions.begin(); ri != group->_regions.end(); ++ri) { - MouseWatcherRegion *region = (*ri); + for (MouseWatcherGroup *group : _groups) { + group->sort_regions(); + for (MouseWatcherRegion *region : group->_regions) { if (region != _preferred_region && region->get_keyboard()) { region->release(param); } diff --git a/panda/src/tform/mouseWatcherBase.I b/panda/src/tform/mouseWatcherBase.I new file mode 100644 index 0000000000..e5739d1de5 --- /dev/null +++ b/panda/src/tform/mouseWatcherBase.I @@ -0,0 +1,32 @@ +/** + * PANDA 3D SOFTWARE + * Copyright (c) Carnegie Mellon University. All rights reserved. + * + * All use of this software is subject to the terms of the revised BSD + * license. You should have received a copy of this license along + * with this source code in a file named "LICENSE." + * + * @file mouseWatcherBase.I + * @author rdb + * @date 2018-06-12 + */ + +/** + * Sorts all the regions in this group into pointer order. + */ +INLINE void MouseWatcherBase:: +sort_regions() { + LightMutexHolder holder(_lock); + if (!_sorted) { + do_sort_regions(); + } +} + +/** + * Returns true if the group has already been sorted, false otherwise. + */ +INLINE bool MouseWatcherBase:: +is_sorted() const { + LightMutexHolder holder(_lock); + return _sorted; +} diff --git a/panda/src/tform/mouseWatcherBase.cxx b/panda/src/tform/mouseWatcherBase.cxx index 2a167e57c5..46c1ae9743 100644 --- a/panda/src/tform/mouseWatcherBase.cxx +++ b/panda/src/tform/mouseWatcherBase.cxx @@ -135,25 +135,6 @@ clear_regions() { #endif // NDEBUG } -/** - * Sorts all the regions in this group into pointer order. - */ -void MouseWatcherBase:: -sort_regions() { - LightMutexHolder holder(_lock); - do_sort_regions(); -} - -/** - * Returns true if the group has already been sorted, false otherwise. - */ -bool MouseWatcherBase:: -is_sorted() const { - LightMutexHolder holder(_lock); - - return _sorted; -} - /** * Returns the number of regions in the group. */ @@ -261,7 +242,7 @@ update_regions() { void MouseWatcherBase:: do_sort_regions() { if (!_sorted) { - sort(_regions.begin(), _regions.end()); + _regions.sort_unique(); _sorted = true; } } diff --git a/panda/src/tform/mouseWatcherBase.h b/panda/src/tform/mouseWatcherBase.h index f20bca0cc5..b7de361653 100644 --- a/panda/src/tform/mouseWatcherBase.h +++ b/panda/src/tform/mouseWatcherBase.h @@ -41,8 +41,8 @@ PUBLISHED: MouseWatcherRegion *find_region(const std::string &name) const; void clear_regions(); - void sort_regions(); - bool is_sorted() const; + INLINE void sort_regions(); + INLINE bool is_sorted() const; MAKE_PROPERTY(sorted, is_sorted); size_t get_num_regions() const; @@ -110,4 +110,6 @@ private: friend class BlobWatcher; }; +#include "mouseWatcherBase.I" + #endif diff --git a/tests/tform/test_mousewatcher.py b/tests/tform/test_mousewatcher.py new file mode 100644 index 0000000000..a4eccbd47b --- /dev/null +++ b/tests/tform/test_mousewatcher.py @@ -0,0 +1,18 @@ +from panda3d.core import MouseWatcher, MouseWatcherRegion + + +def test_mousewatcher_region_add(): + region1 = MouseWatcherRegion("1", 0, 1, 0, 1) + region2 = MouseWatcherRegion("2", 0, 1, 0, 1) + + mw = MouseWatcher() + assert len(mw.regions) == 0 + + mw.add_region(region1) + assert len(mw.regions) == 1 + + mw.add_region(region2) + assert len(mw.regions) == 2 + + mw.add_region(region1) + assert len(mw.regions) == 2 From 7e61891c09d2b1ae0f64e17e5582d2bafb2f202f Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 10 Jun 2018 17:41:51 -0600 Subject: [PATCH 10/14] general: Fix more DLL linkage and EXPCL_PANDA_ macros --- panda/src/gobj/shader.h | 2 +- panda/src/pgraph/cullBin.h | 2 +- panda/src/pgraphnodes/lodNode.h | 2 +- panda/src/pgraphnodes/lodNodeType.h | 4 ++-- panda/src/pgraphnodes/uvScrollNode.h | 2 +- panda/src/pnmimage/config_pnmimage.h | 10 +++++----- panda/src/pnmimage/ppmcmap.h | 12 ++++++------ panda/src/pnmimagetypes/pnmFileTypePfm.h | 2 +- panda/src/pstatclient/pStatClient.h | 2 +- panda/src/pstatclient/pStatTimer.h | 2 +- panda/src/putil/bamReader.cxx | 7 ------- panda/src/putil/bamReader.h | 2 +- panda/src/text/config_text.h | 4 ++-- 13 files changed, 23 insertions(+), 30 deletions(-) diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index 98734dfe50..8e65c005e9 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -436,7 +436,7 @@ public: ShaderPtrType _type; }; - class ShaderCaps { + class EXPCL_PANDA_GOBJ ShaderCaps { public: void clear(); INLINE bool operator == (const ShaderCaps &other) const; diff --git a/panda/src/pgraph/cullBin.h b/panda/src/pgraph/cullBin.h index e3a2ccca55..7a104d1f3b 100644 --- a/panda/src/pgraph/cullBin.h +++ b/panda/src/pgraph/cullBin.h @@ -74,7 +74,7 @@ protected: GraphicsStateGuardianBase *_gsg; // Used in make_result_graph() and fill_result_graph(). - class ResultGraphBuilder { + class EXPCL_PANDA_PGRAPH ResultGraphBuilder { public: ResultGraphBuilder(PandaNode *root_node); void add_object(CullableObject *object); diff --git a/panda/src/pgraphnodes/lodNode.h b/panda/src/pgraphnodes/lodNode.h index c82e066ffc..b7b58dca85 100644 --- a/panda/src/pgraphnodes/lodNode.h +++ b/panda/src/pgraphnodes/lodNode.h @@ -161,7 +161,7 @@ protected: typedef pvector SwitchVector; private: - class EXPCL_PANDA_PGRAPH CData : public CycleData { + class EXPCL_PANDA_PGRAPHNODES CData : public CycleData { public: INLINE CData(); INLINE CData(const CData ©); diff --git a/panda/src/pgraphnodes/lodNodeType.h b/panda/src/pgraphnodes/lodNodeType.h index 507ade03cf..ec1dec820b 100644 --- a/panda/src/pgraphnodes/lodNodeType.h +++ b/panda/src/pgraphnodes/lodNodeType.h @@ -25,7 +25,7 @@ enum LODNodeType { END_PUBLISH -EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, LODNodeType lnt); -EXPCL_PANDA_PGRAPH std::istream &operator >> (std::istream &in, LODNodeType &cs); +EXPCL_PANDA_PGRAPHNODES std::ostream &operator << (std::ostream &out, LODNodeType lnt); +EXPCL_PANDA_PGRAPHNODES std::istream &operator >> (std::istream &in, LODNodeType &cs); #endif diff --git a/panda/src/pgraphnodes/uvScrollNode.h b/panda/src/pgraphnodes/uvScrollNode.h index ac4c29b643..51ab828130 100644 --- a/panda/src/pgraphnodes/uvScrollNode.h +++ b/panda/src/pgraphnodes/uvScrollNode.h @@ -23,7 +23,7 @@ /** * This node is placed at key points within the scene graph to animate uvs. */ -class EXPCL_PANDA_PGRAPH UvScrollNode : public PandaNode { +class EXPCL_PANDA_PGRAPHNODES UvScrollNode : public PandaNode { PUBLISHED: INLINE explicit UvScrollNode(const std::string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed); INLINE explicit UvScrollNode(const std::string &name); diff --git a/panda/src/pnmimage/config_pnmimage.h b/panda/src/pnmimage/config_pnmimage.h index 9ff40dd5a0..f5f6c029bb 100644 --- a/panda/src/pnmimage/config_pnmimage.h +++ b/panda/src/pnmimage/config_pnmimage.h @@ -21,11 +21,11 @@ NotifyCategoryDecl(pnmimage, EXPCL_PANDA_PNMIMAGE, EXPTP_PANDA_PNMIMAGE); -extern ConfigVariableBool pfm_force_littleendian; -extern ConfigVariableBool pfm_reverse_dimensions; -extern ConfigVariableBool pfm_resize_gaussian; -extern ConfigVariableBool pfm_resize_quick; -extern ConfigVariableDouble pfm_resize_radius; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableBool pfm_force_littleendian; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableBool pfm_reverse_dimensions; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableBool pfm_resize_gaussian; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableBool pfm_resize_quick; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableDouble pfm_resize_radius; extern EXPCL_PANDA_PNMIMAGE void init_libpnmimage(); diff --git a/panda/src/pnmimage/ppmcmap.h b/panda/src/pnmimage/ppmcmap.h index f8b9966818..5466de04e7 100644 --- a/panda/src/pnmimage/ppmcmap.h +++ b/panda/src/pnmimage/ppmcmap.h @@ -26,7 +26,7 @@ struct colorhist_list_item EXPCL_PANDA_PNMIMAGE colorhist_vector ppm_computecolorhist( pixel** pixels, int cols, int rows, int maxcolors, int* colorsP ); /* Returns a colorhist *colorsP long (with space allocated for maxcolors. */ -void ppm_addtocolorhist ( colorhist_vector chv, int* colorsP, int maxcolors, pixel* colorP, int value, int position ); +EXPCL_PANDA_PNMIMAGE void ppm_addtocolorhist ( colorhist_vector chv, int* colorsP, int maxcolors, pixel* colorP, int value, int position ); EXPCL_PANDA_PNMIMAGE void ppm_freecolorhist( colorhist_vector chv ); @@ -35,19 +35,19 @@ EXPCL_PANDA_PNMIMAGE void ppm_freecolorhist( colorhist_vector chv ); typedef colorhist_list* colorhash_table; -colorhash_table ppm_computecolorhash ( pixel** pixels, int cols, int rows, int maxcolors, int* colorsP ); +EXPCL_PANDA_PNMIMAGE colorhash_table ppm_computecolorhash ( pixel** pixels, int cols, int rows, int maxcolors, int* colorsP ); EXPCL_PANDA_PNMIMAGE int ppm_lookupcolor( colorhash_table cht, pixel* colorP ); -colorhist_vector ppm_colorhashtocolorhist ( colorhash_table cht, int maxcolors ); +EXPCL_PANDA_PNMIMAGE colorhist_vector ppm_colorhashtocolorhist ( colorhash_table cht, int maxcolors ); EXPCL_PANDA_PNMIMAGE colorhash_table ppm_colorhisttocolorhash( colorhist_vector chv, int colors ); -int ppm_addtocolorhash ( colorhash_table cht, pixel* colorP, int value ); +EXPCL_PANDA_PNMIMAGE int ppm_addtocolorhash ( colorhash_table cht, pixel* colorP, int value ); /* Returns -1 on failure. */ -colorhash_table ppm_alloccolorhash ( void ); +EXPCL_PANDA_PNMIMAGE colorhash_table ppm_alloccolorhash ( void ); -void ppm_freecolorhash( colorhash_table cht ); +EXPCL_PANDA_PNMIMAGE void ppm_freecolorhash( colorhash_table cht ); #endif diff --git a/panda/src/pnmimagetypes/pnmFileTypePfm.h b/panda/src/pnmimagetypes/pnmFileTypePfm.h index aa41adb1df..ab18685084 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePfm.h +++ b/panda/src/pnmimagetypes/pnmFileTypePfm.h @@ -25,7 +25,7 @@ * For reading and writing PFM files using the basic PNMImage interface, as if * they were basic RGB files. */ -class EXPCL_PANDA_PNMIMAGE PNMFileTypePfm : public PNMFileType { +class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypePfm : public PNMFileType { public: PNMFileTypePfm(); diff --git a/panda/src/pstatclient/pStatClient.h b/panda/src/pstatclient/pStatClient.h index 8ee255613b..bdcdb4eb20 100644 --- a/panda/src/pstatclient/pStatClient.h +++ b/panda/src/pstatclient/pStatClient.h @@ -169,7 +169,7 @@ private: // This is where the meat of the Collector data is stored. (All the stuff // in PStatCollector and PStatCollectorDef is just fluff.) - class Collector { + class EXPCL_PANDA_PSTATCLIENT Collector { public: INLINE Collector(int parent_index, const std::string &name); INLINE int get_parent_index() const; diff --git a/panda/src/pstatclient/pStatTimer.h b/panda/src/pstatclient/pStatTimer.h index b7a32f27e2..4cfca5a7d2 100644 --- a/panda/src/pstatclient/pStatTimer.h +++ b/panda/src/pstatclient/pStatTimer.h @@ -27,7 +27,7 @@ class Thread; * and when the PStatTimer variable goes out of scope (for instance, at the * end of the function), it will automatically stop the Collector. */ -class EXPCL_PANDA_PSTATCLIENT PStatTimer { +class PStatTimer { public: #ifdef DO_PSTATS INLINE PStatTimer(PStatCollector &collector); diff --git a/panda/src/putil/bamReader.cxx b/panda/src/putil/bamReader.cxx index e6cc5683d6..a1b6641148 100644 --- a/panda/src/putil/bamReader.cxx +++ b/panda/src/putil/bamReader.cxx @@ -1544,10 +1544,3 @@ finalize() { } } } - -/** - * - */ -BamReader::AuxData:: -~AuxData() { -} diff --git a/panda/src/putil/bamReader.h b/panda/src/putil/bamReader.h index 84312ac4a6..69c901f0fa 100644 --- a/panda/src/putil/bamReader.h +++ b/panda/src/putil/bamReader.h @@ -228,7 +228,7 @@ public: class AuxData : public ReferenceCount { public: INLINE AuxData(); - virtual ~AuxData(); + virtual ~AuxData() = default; }; private: diff --git a/panda/src/text/config_text.h b/panda/src/text/config_text.h index 131b95809d..cf58c5c811 100644 --- a/panda/src/text/config_text.h +++ b/panda/src/text/config_text.h @@ -40,8 +40,8 @@ extern ConfigVariableBool text_small_caps; extern EXPCL_PANDA_TEXT ConfigVariableDouble text_small_caps_scale; extern ConfigVariableFilename text_default_font; extern EXPCL_PANDA_TEXT ConfigVariableDouble text_tab_width; -extern ConfigVariableInt text_push_properties_key; -extern ConfigVariableInt text_pop_properties_key; +extern EXPCL_PANDA_TEXT ConfigVariableInt text_push_properties_key; +extern EXPCL_PANDA_TEXT ConfigVariableInt text_pop_properties_key; extern ConfigVariableInt text_soft_hyphen_key; extern ConfigVariableInt text_soft_break_key; extern ConfigVariableInt text_embed_graphic_key; From e73c25d15e9b710d9bedb3d81fb14d0d2fababd7 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 10 Jun 2018 19:19:24 -0600 Subject: [PATCH 11/14] general: Break apart BUILDING_PANDAPHYSICS --- panda/src/pandabase/pandasymbols.h | 22 +++++++++++++++++++ panda/src/particlesystem/arcEmitter.h | 2 +- panda/src/particlesystem/baseParticle.h | 2 +- .../src/particlesystem/baseParticleEmitter.h | 2 +- .../src/particlesystem/baseParticleFactory.h | 2 +- .../src/particlesystem/baseParticleRenderer.h | 2 +- panda/src/particlesystem/boxEmitter.h | 2 +- .../colorInterpolationManager.h | 14 ++++++------ .../particlesystem/config_particlesystem.cxx | 4 ++-- .../particlesystem/config_particlesystem.h | 6 ++--- panda/src/particlesystem/discEmitter.h | 2 +- .../src/particlesystem/geomParticleRenderer.h | 2 +- panda/src/particlesystem/lineEmitter.h | 2 +- .../src/particlesystem/lineParticleRenderer.h | 2 +- panda/src/particlesystem/orientedParticle.h | 2 +- .../particlesystem/orientedParticleFactory.h | 2 +- panda/src/particlesystem/particleSystem.h | 2 +- .../particlesystem/particleSystemManager.h | 2 +- panda/src/particlesystem/pointEmitter.h | 2 +- panda/src/particlesystem/pointParticle.h | 2 +- .../src/particlesystem/pointParticleFactory.h | 2 +- .../particlesystem/pointParticleRenderer.h | 2 +- panda/src/particlesystem/rectangleEmitter.h | 2 +- panda/src/particlesystem/ringEmitter.h | 2 +- .../particlesystem/sparkleParticleRenderer.h | 2 +- .../src/particlesystem/sphereSurfaceEmitter.h | 2 +- .../src/particlesystem/sphereVolumeEmitter.h | 2 +- .../particlesystem/spriteParticleRenderer.h | 2 +- panda/src/particlesystem/tangentRingEmitter.h | 2 +- panda/src/particlesystem/zSpinParticle.h | 2 +- .../src/particlesystem/zSpinParticleFactory.h | 2 +- panda/src/physics/actorNode.h | 2 +- panda/src/physics/angularEulerIntegrator.h | 2 +- panda/src/physics/angularForce.h | 2 +- panda/src/physics/angularIntegrator.h | 2 +- panda/src/physics/angularVectorForce.h | 2 +- panda/src/physics/baseForce.h | 2 +- panda/src/physics/baseIntegrator.h | 2 +- panda/src/physics/config_physics.cxx | 4 ++-- panda/src/physics/config_physics.h | 6 ++--- panda/src/physics/forceNode.h | 2 +- panda/src/physics/linearControlForce.h | 2 +- panda/src/physics/linearCylinderVortexForce.h | 2 +- panda/src/physics/linearDistanceForce.h | 2 +- panda/src/physics/linearEulerIntegrator.h | 2 +- panda/src/physics/linearForce.h | 2 +- panda/src/physics/linearFrictionForce.h | 2 +- panda/src/physics/linearIntegrator.h | 2 +- panda/src/physics/linearJitterForce.h | 2 +- panda/src/physics/linearNoiseForce.h | 2 +- panda/src/physics/linearRandomForce.h | 2 +- panda/src/physics/linearSinkForce.h | 2 +- panda/src/physics/linearSourceForce.h | 2 +- panda/src/physics/linearUserDefinedForce.h | 2 +- panda/src/physics/linearVectorForce.h | 2 +- panda/src/physics/physical.h | 2 +- panda/src/physics/physicalNode.h | 2 +- panda/src/physics/physicsCollisionHandler.h | 2 +- panda/src/physics/physicsManager.h | 2 +- panda/src/physics/physicsObject.h | 2 +- panda/src/physics/physicsObjectCollection.h | 2 +- 61 files changed, 94 insertions(+), 72 deletions(-) diff --git a/panda/src/pandabase/pandasymbols.h b/panda/src/pandabase/pandasymbols.h index a1b17ffb86..d0f7fd19f0 100644 --- a/panda/src/pandabase/pandasymbols.h +++ b/panda/src/pandabase/pandasymbols.h @@ -111,6 +111,12 @@ #define BUILDING_PANDA_EXPRESS #endif +/* BUILDING_PANDAPHYSICS for these: */ +#ifdef BUILDING_PANDAPHYSICS + #define BUILDING_PANDA_PARTICLESYSTEM + #define BUILDING_PANDA_PHYSICS +#endif + #ifdef BUILDING_LIBPANDA #define EXPCL_LIBPANDA EXPORT_CLASS #define EXPTP_LIBPANDA EXPORT_TEMPL @@ -287,6 +293,14 @@ #define EXPTP_PANDA_PARAMETRICS IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_PARTICLESYSTEM + #define EXPCL_PANDA_PARTICLESYSTEM EXPORT_CLASS + #define EXPTP_PANDA_PARTICLESYSTEM EXPORT_TEMPL +#else + #define EXPCL_PANDA_PARTICLESYSTEM IMPORT_CLASS + #define EXPTP_PANDA_PARTICLESYSTEM IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_PGRAPH #define EXPCL_PANDA_PGRAPH EXPORT_CLASS #define EXPTP_PANDA_PGRAPH EXPORT_TEMPL @@ -311,6 +325,14 @@ #define EXPTP_PANDA_PGUI IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_PHYSICS + #define EXPCL_PANDA_PHYSICS EXPORT_CLASS + #define EXPTP_PANDA_PHYSICS EXPORT_TEMPL +#else + #define EXPCL_PANDA_PHYSICS IMPORT_CLASS + #define EXPTP_PANDA_PHYSICS IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_PIPELINE #define EXPCL_PANDA_PIPELINE EXPORT_CLASS #define EXPTP_PANDA_PIPELINE EXPORT_TEMPL diff --git a/panda/src/particlesystem/arcEmitter.h b/panda/src/particlesystem/arcEmitter.h index ce95891b3e..3d8dc3988e 100644 --- a/panda/src/particlesystem/arcEmitter.h +++ b/panda/src/particlesystem/arcEmitter.h @@ -19,7 +19,7 @@ /** * Describes a planar ring region in which particles are generated. */ -class EXPCL_PANDAPHYSICS ArcEmitter : public RingEmitter { +class EXPCL_PANDA_PARTICLESYSTEM ArcEmitter : public RingEmitter { PUBLISHED: ArcEmitter(); ArcEmitter(const ArcEmitter ©); diff --git a/panda/src/particlesystem/baseParticle.h b/panda/src/particlesystem/baseParticle.h index edc14ca0f1..487f9ba476 100644 --- a/panda/src/particlesystem/baseParticle.h +++ b/panda/src/particlesystem/baseParticle.h @@ -20,7 +20,7 @@ /** * An individual, physically-modelable particle abstract base class. */ -class EXPCL_PANDAPHYSICS BaseParticle : public PhysicsObject { +class EXPCL_PANDA_PARTICLESYSTEM BaseParticle : public PhysicsObject { public: // local methods INLINE void set_age(PN_stdfloat age); diff --git a/panda/src/particlesystem/baseParticleEmitter.h b/panda/src/particlesystem/baseParticleEmitter.h index aad4d1ad17..f1c6665679 100644 --- a/panda/src/particlesystem/baseParticleEmitter.h +++ b/panda/src/particlesystem/baseParticleEmitter.h @@ -22,7 +22,7 @@ #include "mathNumbers.h" -class EXPCL_PANDAPHYSICS BaseParticleEmitter : public ReferenceCount { +class EXPCL_PANDA_PARTICLESYSTEM BaseParticleEmitter : public ReferenceCount { PUBLISHED: enum emissionType { ET_EXPLICIT, // all particles are emitted in parallel along the same vector diff --git a/panda/src/particlesystem/baseParticleFactory.h b/panda/src/particlesystem/baseParticleFactory.h index 47073862f2..0271ef91eb 100644 --- a/panda/src/particlesystem/baseParticleFactory.h +++ b/panda/src/particlesystem/baseParticleFactory.h @@ -25,7 +25,7 @@ /** * Pure Virtual base class for creating particles */ -class EXPCL_PANDAPHYSICS BaseParticleFactory : public ReferenceCount { +class EXPCL_PANDA_PARTICLESYSTEM BaseParticleFactory : public ReferenceCount { PUBLISHED: virtual ~BaseParticleFactory(); diff --git a/panda/src/particlesystem/baseParticleRenderer.h b/panda/src/particlesystem/baseParticleRenderer.h index bab215567a..8dd8a0a081 100644 --- a/panda/src/particlesystem/baseParticleRenderer.h +++ b/panda/src/particlesystem/baseParticleRenderer.h @@ -29,7 +29,7 @@ /** * Pure virtual particle renderer base class */ -class EXPCL_PANDAPHYSICS BaseParticleRenderer : public ReferenceCount { +class EXPCL_PANDA_PARTICLESYSTEM BaseParticleRenderer : public ReferenceCount { PUBLISHED: enum ParticleRendererAlphaMode { PR_ALPHA_NONE, diff --git a/panda/src/particlesystem/boxEmitter.h b/panda/src/particlesystem/boxEmitter.h index 830e7827af..9899a04978 100644 --- a/panda/src/particlesystem/boxEmitter.h +++ b/panda/src/particlesystem/boxEmitter.h @@ -19,7 +19,7 @@ /** * Describes a voluminous box region in which particles are generated. */ -class EXPCL_PANDAPHYSICS BoxEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM BoxEmitter : public BaseParticleEmitter { PUBLISHED: BoxEmitter(); BoxEmitter(const BoxEmitter ©); diff --git a/panda/src/particlesystem/colorInterpolationManager.h b/panda/src/particlesystem/colorInterpolationManager.h index 917694bee7..441ec4de7a 100644 --- a/panda/src/particlesystem/colorInterpolationManager.h +++ b/panda/src/particlesystem/colorInterpolationManager.h @@ -24,7 +24,7 @@ * virtual interpolate() function. */ -class EXPCL_PANDAPHYSICS ColorInterpolationFunction : public TypedReferenceCount { +class EXPCL_PANDA_PARTICLESYSTEM ColorInterpolationFunction : public TypedReferenceCount { PUBLISHED: // virtual string get_type(); @@ -57,7 +57,7 @@ private: * Defines a constant color over the lifetime of the segment. */ -class EXPCL_PANDAPHYSICS ColorInterpolationFunctionConstant : public ColorInterpolationFunction { +class EXPCL_PANDA_PARTICLESYSTEM ColorInterpolationFunctionConstant : public ColorInterpolationFunction { PUBLISHED: INLINE LColor get_color_a() const; @@ -96,7 +96,7 @@ private: * Defines a linear interpolation over the lifetime of the segment. */ -class EXPCL_PANDAPHYSICS ColorInterpolationFunctionLinear : public ColorInterpolationFunctionConstant { +class EXPCL_PANDA_PARTICLESYSTEM ColorInterpolationFunctionLinear : public ColorInterpolationFunctionConstant { PUBLISHED: INLINE LColor get_color_b() const; @@ -138,7 +138,7 @@ private: * repeats until the end of the segment. */ -class EXPCL_PANDAPHYSICS ColorInterpolationFunctionStepwave : public ColorInterpolationFunctionLinear { +class EXPCL_PANDA_PARTICLESYSTEM ColorInterpolationFunctionStepwave : public ColorInterpolationFunctionLinear { PUBLISHED: INLINE PN_stdfloat get_width_a() const; INLINE PN_stdfloat get_width_b() const; @@ -183,7 +183,7 @@ private: * result in a higher frequency cycle. */ -class EXPCL_PANDAPHYSICS ColorInterpolationFunctionSinusoid : public ColorInterpolationFunctionLinear { +class EXPCL_PANDA_PARTICLESYSTEM ColorInterpolationFunctionSinusoid : public ColorInterpolationFunctionLinear { PUBLISHED: INLINE PN_stdfloat get_period() const; @@ -224,7 +224,7 @@ private: * segment also has a function associated with it. */ -class EXPCL_PANDAPHYSICS ColorInterpolationSegment : public ReferenceCount { +class EXPCL_PANDA_PARTICLESYSTEM ColorInterpolationSegment : public ReferenceCount { public: ColorInterpolationSegment(ColorInterpolationFunction* function, const PN_stdfloat &time_begin, const PN_stdfloat &time_end, const bool is_modulated, const int id); @@ -266,7 +266,7 @@ protected: * Access to these segments is provided but not necessary general use. */ -class EXPCL_PANDAPHYSICS ColorInterpolationManager : public ReferenceCount { +class EXPCL_PANDA_PARTICLESYSTEM ColorInterpolationManager : public ReferenceCount { PUBLISHED: ColorInterpolationManager(); ColorInterpolationManager(const LColor &c); diff --git a/panda/src/particlesystem/config_particlesystem.cxx b/panda/src/particlesystem/config_particlesystem.cxx index 0eba6c33f1..61f1224ea4 100644 --- a/panda/src/particlesystem/config_particlesystem.cxx +++ b/panda/src/particlesystem/config_particlesystem.cxx @@ -16,8 +16,8 @@ #include "geomParticleRenderer.h" #include "geomNode.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAPHYSICS) - #error Buildsystem error: BUILDING_PANDAPHYSICS not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_PARTICLESYSTEM) + #error Buildsystem error: BUILDING_PANDA_PARTICLESYSTEM not defined #endif ConfigureDef(config_particlesystem); diff --git a/panda/src/particlesystem/config_particlesystem.h b/panda/src/particlesystem/config_particlesystem.h index 16382b274c..56beffeaf0 100644 --- a/panda/src/particlesystem/config_particlesystem.h +++ b/panda/src/particlesystem/config_particlesystem.h @@ -18,10 +18,10 @@ #include "notifyCategoryProxy.h" #include "dconfig.h" -ConfigureDecl(config_particlesystem, EXPCL_PANDAPHYSICS, EXPTP_PANDAPHYSICS); -NotifyCategoryDecl(particlesystem, EXPCL_PANDAPHYSICS, EXPTP_PANDAPHYSICS); +ConfigureDecl(config_particlesystem, EXPCL_PANDA_PARTICLESYSTEM, EXPTP_PANDA_PARTICLESYSTEM); +NotifyCategoryDecl(particlesystem, EXPCL_PANDA_PARTICLESYSTEM, EXPTP_PANDA_PARTICLESYSTEM); -extern EXPCL_PANDAPHYSICS void init_libparticlesystem(); +extern EXPCL_PANDA_PARTICLESYSTEM void init_libparticlesystem(); #ifndef NDEBUG //[ // Non-release build: diff --git a/panda/src/particlesystem/discEmitter.h b/panda/src/particlesystem/discEmitter.h index 0ce8bf9d70..fcfcf9b94a 100644 --- a/panda/src/particlesystem/discEmitter.h +++ b/panda/src/particlesystem/discEmitter.h @@ -19,7 +19,7 @@ /** * Describes a planar disc region from which particles are generated */ -class EXPCL_PANDAPHYSICS DiscEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM DiscEmitter : public BaseParticleEmitter { PUBLISHED: DiscEmitter(); DiscEmitter(const DiscEmitter ©); diff --git a/panda/src/particlesystem/geomParticleRenderer.h b/panda/src/particlesystem/geomParticleRenderer.h index f80322a5bd..a9fd906dd4 100644 --- a/panda/src/particlesystem/geomParticleRenderer.h +++ b/panda/src/particlesystem/geomParticleRenderer.h @@ -23,7 +23,7 @@ #include "pvector.h" #include "pStatCollector.h" -class EXPCL_PANDAPHYSICS GeomParticleRenderer : public BaseParticleRenderer { +class EXPCL_PANDA_PARTICLESYSTEM GeomParticleRenderer : public BaseParticleRenderer { PUBLISHED: explicit GeomParticleRenderer(ParticleRendererAlphaMode am = PR_ALPHA_NONE, PandaNode *geom_node = nullptr); diff --git a/panda/src/particlesystem/lineEmitter.h b/panda/src/particlesystem/lineEmitter.h index 0b5a832563..80422654fb 100644 --- a/panda/src/particlesystem/lineEmitter.h +++ b/panda/src/particlesystem/lineEmitter.h @@ -19,7 +19,7 @@ /** * Describes a linear region in which particles are generated. */ -class EXPCL_PANDAPHYSICS LineEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM LineEmitter : public BaseParticleEmitter { PUBLISHED: LineEmitter(); LineEmitter(const LineEmitter ©); diff --git a/panda/src/particlesystem/lineParticleRenderer.h b/panda/src/particlesystem/lineParticleRenderer.h index 86dcc5973c..ecec62fc8e 100644 --- a/panda/src/particlesystem/lineParticleRenderer.h +++ b/panda/src/particlesystem/lineParticleRenderer.h @@ -28,7 +28,7 @@ * sparks, etc. */ -class EXPCL_PANDAPHYSICS LineParticleRenderer : public BaseParticleRenderer { +class EXPCL_PANDA_PARTICLESYSTEM LineParticleRenderer : public BaseParticleRenderer { PUBLISHED: LineParticleRenderer(); LineParticleRenderer(const LineParticleRenderer& copy); diff --git a/panda/src/particlesystem/orientedParticle.h b/panda/src/particlesystem/orientedParticle.h index 0f021fed8d..740b8e03d6 100644 --- a/panda/src/particlesystem/orientedParticle.h +++ b/panda/src/particlesystem/orientedParticle.h @@ -20,7 +20,7 @@ * Describes a particle that has angular characteristics (velocity, * orientation). */ -class EXPCL_PANDAPHYSICS OrientedParticle : public BaseParticle { +class EXPCL_PANDA_PARTICLESYSTEM OrientedParticle : public BaseParticle { public: OrientedParticle(int lifespan = 0, bool alive = false); OrientedParticle(const OrientedParticle ©); diff --git a/panda/src/particlesystem/orientedParticleFactory.h b/panda/src/particlesystem/orientedParticleFactory.h index a38d5e2ec0..d33f18009b 100644 --- a/panda/src/particlesystem/orientedParticleFactory.h +++ b/panda/src/particlesystem/orientedParticleFactory.h @@ -21,7 +21,7 @@ /** * Creates particles that are affected by angular forces. */ -class EXPCL_PANDAPHYSICS OrientedParticleFactory : public BaseParticleFactory { +class EXPCL_PANDA_PARTICLESYSTEM OrientedParticleFactory : public BaseParticleFactory { PUBLISHED: OrientedParticleFactory(); OrientedParticleFactory(const OrientedParticleFactory ©); diff --git a/panda/src/particlesystem/particleSystem.h b/panda/src/particlesystem/particleSystem.h index 9c453b1b50..a7b4af64ef 100644 --- a/panda/src/particlesystem/particleSystem.h +++ b/panda/src/particlesystem/particleSystem.h @@ -37,7 +37,7 @@ class ParticleSystemManager; /** * Contains and manages a particle system. */ -class EXPCL_PANDAPHYSICS ParticleSystem : public Physical { +class EXPCL_PANDA_PARTICLESYSTEM ParticleSystem : public Physical { PUBLISHED: // constructordestructor diff --git a/panda/src/particlesystem/particleSystemManager.h b/panda/src/particlesystem/particleSystemManager.h index b083076e8a..5bfbe09ec7 100644 --- a/panda/src/particlesystem/particleSystemManager.h +++ b/panda/src/particlesystem/particleSystemManager.h @@ -24,7 +24,7 @@ * one doesn't have to be updated and rendered every frame See Also : * particleSystemManager.cxx */ -class EXPCL_PANDAPHYSICS ParticleSystemManager { +class EXPCL_PANDA_PARTICLESYSTEM ParticleSystemManager { PUBLISHED: explicit ParticleSystemManager(int every_nth_frame = 1); virtual ~ParticleSystemManager(); diff --git a/panda/src/particlesystem/pointEmitter.h b/panda/src/particlesystem/pointEmitter.h index fd59ea1aea..90af2a899a 100644 --- a/panda/src/particlesystem/pointEmitter.h +++ b/panda/src/particlesystem/pointEmitter.h @@ -19,7 +19,7 @@ /** * Describes a planar ring region in which particles are generated. */ -class EXPCL_PANDAPHYSICS PointEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM PointEmitter : public BaseParticleEmitter { PUBLISHED: PointEmitter(); PointEmitter(const PointEmitter ©); diff --git a/panda/src/particlesystem/pointParticle.h b/panda/src/particlesystem/pointParticle.h index 44e067edaf..bf7b70a98b 100644 --- a/panda/src/particlesystem/pointParticle.h +++ b/panda/src/particlesystem/pointParticle.h @@ -20,7 +20,7 @@ * Describes a particle that requires representation by a point (pixel, * sparkle, billboard) */ -class EXPCL_PANDAPHYSICS PointParticle : public BaseParticle { +class EXPCL_PANDA_PARTICLESYSTEM PointParticle : public BaseParticle { public: PointParticle(PN_stdfloat lifespan = 0.0f, bool alive = false); PointParticle(const PointParticle ©); diff --git a/panda/src/particlesystem/pointParticleFactory.h b/panda/src/particlesystem/pointParticleFactory.h index acaccf835e..3c2df92ff7 100644 --- a/panda/src/particlesystem/pointParticleFactory.h +++ b/panda/src/particlesystem/pointParticleFactory.h @@ -20,7 +20,7 @@ * Creates point particles to user specs */ -class EXPCL_PANDAPHYSICS PointParticleFactory : public BaseParticleFactory { +class EXPCL_PANDA_PARTICLESYSTEM PointParticleFactory : public BaseParticleFactory { PUBLISHED: PointParticleFactory(); PointParticleFactory(const PointParticleFactory ©); diff --git a/panda/src/particlesystem/pointParticleRenderer.h b/panda/src/particlesystem/pointParticleRenderer.h index 114cbb0e93..ff2f7b3f98 100644 --- a/panda/src/particlesystem/pointParticleRenderer.h +++ b/panda/src/particlesystem/pointParticleRenderer.h @@ -30,7 +30,7 @@ * BillboardParticleRenderer for that. */ -class EXPCL_PANDAPHYSICS PointParticleRenderer : public BaseParticleRenderer { +class EXPCL_PANDA_PARTICLESYSTEM PointParticleRenderer : public BaseParticleRenderer { PUBLISHED: enum PointParticleBlendType { PP_ONE_COLOR, diff --git a/panda/src/particlesystem/rectangleEmitter.h b/panda/src/particlesystem/rectangleEmitter.h index 7805d3b619..d425c70618 100644 --- a/panda/src/particlesystem/rectangleEmitter.h +++ b/panda/src/particlesystem/rectangleEmitter.h @@ -19,7 +19,7 @@ /** * Describes a planar square region in which particles are generated. */ -class EXPCL_PANDAPHYSICS RectangleEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM RectangleEmitter : public BaseParticleEmitter { PUBLISHED: RectangleEmitter(); RectangleEmitter(const RectangleEmitter ©); diff --git a/panda/src/particlesystem/ringEmitter.h b/panda/src/particlesystem/ringEmitter.h index 7bc9516148..cdd3d484f7 100644 --- a/panda/src/particlesystem/ringEmitter.h +++ b/panda/src/particlesystem/ringEmitter.h @@ -19,7 +19,7 @@ /** * Describes a planar ring region in which particles are generated. */ -class EXPCL_PANDAPHYSICS RingEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM RingEmitter : public BaseParticleEmitter { PUBLISHED: RingEmitter(); RingEmitter(const RingEmitter ©); diff --git a/panda/src/particlesystem/sparkleParticleRenderer.h b/panda/src/particlesystem/sparkleParticleRenderer.h index 040d4a5315..6b81e07cc5 100644 --- a/panda/src/particlesystem/sparkleParticleRenderer.h +++ b/panda/src/particlesystem/sparkleParticleRenderer.h @@ -31,7 +31,7 @@ enum SparkleParticleLifeScale { /** * pretty sparkly things. */ -class EXPCL_PANDAPHYSICS SparkleParticleRenderer : public BaseParticleRenderer { +class EXPCL_PANDA_PARTICLESYSTEM SparkleParticleRenderer : public BaseParticleRenderer { PUBLISHED: enum SparkleParticleLifeScale { SP_NO_SCALE, diff --git a/panda/src/particlesystem/sphereSurfaceEmitter.h b/panda/src/particlesystem/sphereSurfaceEmitter.h index e5f9cebaae..f2ee42488c 100644 --- a/panda/src/particlesystem/sphereSurfaceEmitter.h +++ b/panda/src/particlesystem/sphereSurfaceEmitter.h @@ -19,7 +19,7 @@ /** * Describes a curved space in which particles are generated. */ -class EXPCL_PANDAPHYSICS SphereSurfaceEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM SphereSurfaceEmitter : public BaseParticleEmitter { PUBLISHED: SphereSurfaceEmitter(); SphereSurfaceEmitter(const SphereSurfaceEmitter ©); diff --git a/panda/src/particlesystem/sphereVolumeEmitter.h b/panda/src/particlesystem/sphereVolumeEmitter.h index 14981b1b50..9907bbd3cf 100644 --- a/panda/src/particlesystem/sphereVolumeEmitter.h +++ b/panda/src/particlesystem/sphereVolumeEmitter.h @@ -19,7 +19,7 @@ /** * Describes a voluminous spherical region in which particles are generated. */ -class EXPCL_PANDAPHYSICS SphereVolumeEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM SphereVolumeEmitter : public BaseParticleEmitter { PUBLISHED: SphereVolumeEmitter(); SphereVolumeEmitter(const SphereVolumeEmitter ©); diff --git a/panda/src/particlesystem/spriteParticleRenderer.h b/panda/src/particlesystem/spriteParticleRenderer.h index c26f0ee7c1..0de03533d6 100644 --- a/panda/src/particlesystem/spriteParticleRenderer.h +++ b/panda/src/particlesystem/spriteParticleRenderer.h @@ -151,7 +151,7 @@ private: /** * Renders a particle system with high-speed nasty trick sprites. */ -class EXPCL_PANDAPHYSICS SpriteParticleRenderer : public BaseParticleRenderer { +class EXPCL_PANDA_PARTICLESYSTEM SpriteParticleRenderer : public BaseParticleRenderer { PUBLISHED: explicit SpriteParticleRenderer(Texture *tex = nullptr); SpriteParticleRenderer(const SpriteParticleRenderer ©); diff --git a/panda/src/particlesystem/tangentRingEmitter.h b/panda/src/particlesystem/tangentRingEmitter.h index 7100b7ee80..51bd8112b3 100644 --- a/panda/src/particlesystem/tangentRingEmitter.h +++ b/panda/src/particlesystem/tangentRingEmitter.h @@ -20,7 +20,7 @@ * Describes a planar ring region in which tangent particles are generated, * and particles fly off tangential to the ring. */ -class EXPCL_PANDAPHYSICS TangentRingEmitter : public BaseParticleEmitter { +class EXPCL_PANDA_PARTICLESYSTEM TangentRingEmitter : public BaseParticleEmitter { PUBLISHED: TangentRingEmitter(); TangentRingEmitter(const TangentRingEmitter ©); diff --git a/panda/src/particlesystem/zSpinParticle.h b/panda/src/particlesystem/zSpinParticle.h index ad867d7269..da5d39197b 100644 --- a/panda/src/particlesystem/zSpinParticle.h +++ b/panda/src/particlesystem/zSpinParticle.h @@ -22,7 +22,7 @@ * your sprites to spin without having them be full-blown oriented (i.e. * angry quat math), use this. */ -class EXPCL_PANDAPHYSICS ZSpinParticle : public BaseParticle { +class EXPCL_PANDA_PARTICLESYSTEM ZSpinParticle : public BaseParticle { public: ZSpinParticle(); ZSpinParticle(const ZSpinParticle ©); diff --git a/panda/src/particlesystem/zSpinParticleFactory.h b/panda/src/particlesystem/zSpinParticleFactory.h index 2ef6819069..491b1bf65f 100644 --- a/panda/src/particlesystem/zSpinParticleFactory.h +++ b/panda/src/particlesystem/zSpinParticleFactory.h @@ -19,7 +19,7 @@ /** * */ -class EXPCL_PANDAPHYSICS ZSpinParticleFactory : public BaseParticleFactory { +class EXPCL_PANDA_PARTICLESYSTEM ZSpinParticleFactory : public BaseParticleFactory { PUBLISHED: ZSpinParticleFactory(); ZSpinParticleFactory(const ZSpinParticleFactory ©); diff --git a/panda/src/physics/actorNode.h b/panda/src/physics/actorNode.h index 17e704a3ce..719b6b16f9 100644 --- a/panda/src/physics/actorNode.h +++ b/panda/src/physics/actorNode.h @@ -23,7 +23,7 @@ * will be reflected as transforms. This relation goes both ways; changes in * the transform will update the object's position (shoves). */ -class EXPCL_PANDAPHYSICS ActorNode : public PhysicalNode { +class EXPCL_PANDA_PHYSICS ActorNode : public PhysicalNode { PUBLISHED: explicit ActorNode(const std::string &name = ""); ActorNode(const ActorNode ©); diff --git a/panda/src/physics/angularEulerIntegrator.h b/panda/src/physics/angularEulerIntegrator.h index aa9cc71a78..1710d0841f 100644 --- a/panda/src/physics/angularEulerIntegrator.h +++ b/panda/src/physics/angularEulerIntegrator.h @@ -20,7 +20,7 @@ * Performs Euler integration on a vector of physically modelable objects * given a quantum dt. */ -class EXPCL_PANDAPHYSICS AngularEulerIntegrator : public AngularIntegrator { +class EXPCL_PANDA_PHYSICS AngularEulerIntegrator : public AngularIntegrator { PUBLISHED: AngularEulerIntegrator(); virtual ~AngularEulerIntegrator(); diff --git a/panda/src/physics/angularForce.h b/panda/src/physics/angularForce.h index 85d6b09a1a..e090095295 100644 --- a/panda/src/physics/angularForce.h +++ b/panda/src/physics/angularForce.h @@ -19,7 +19,7 @@ /** * pure virtual parent of all quat-based forces. */ -class EXPCL_PANDAPHYSICS AngularForce : public BaseForce { +class EXPCL_PANDA_PHYSICS AngularForce : public BaseForce { PUBLISHED: virtual ~AngularForce(); diff --git a/panda/src/physics/angularIntegrator.h b/panda/src/physics/angularIntegrator.h index 0accd60014..43f65c9581 100644 --- a/panda/src/physics/angularIntegrator.h +++ b/panda/src/physics/angularIntegrator.h @@ -22,7 +22,7 @@ * Pure virtual base class for physical modeling. Takes physically modelable * objects and applies forces to them. */ -class EXPCL_PANDAPHYSICS AngularIntegrator : public BaseIntegrator { +class EXPCL_PANDA_PHYSICS AngularIntegrator : public BaseIntegrator { PUBLISHED: virtual ~AngularIntegrator(); public: diff --git a/panda/src/physics/angularVectorForce.h b/panda/src/physics/angularVectorForce.h index 3560f67db0..2c45f5d43c 100644 --- a/panda/src/physics/angularVectorForce.h +++ b/panda/src/physics/angularVectorForce.h @@ -20,7 +20,7 @@ * a simple directed torque force, the angular equivalent of simple vector * force. */ -class EXPCL_PANDAPHYSICS AngularVectorForce : public AngularForce { +class EXPCL_PANDA_PHYSICS AngularVectorForce : public AngularForce { PUBLISHED: explicit AngularVectorForce(const LRotation& quat); explicit AngularVectorForce(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r); diff --git a/panda/src/physics/baseForce.h b/panda/src/physics/baseForce.h index 9d046596a3..ffe8f58295 100644 --- a/panda/src/physics/baseForce.h +++ b/panda/src/physics/baseForce.h @@ -26,7 +26,7 @@ class ForceNode; /** * pure virtual base class for all forces that could POSSIBLY exist. */ -class EXPCL_PANDAPHYSICS BaseForce : public TypedReferenceCount { +class EXPCL_PANDA_PHYSICS BaseForce : public TypedReferenceCount { PUBLISHED: virtual ~BaseForce(); diff --git a/panda/src/physics/baseIntegrator.h b/panda/src/physics/baseIntegrator.h index 528f882021..5921b6e019 100644 --- a/panda/src/physics/baseIntegrator.h +++ b/panda/src/physics/baseIntegrator.h @@ -31,7 +31,7 @@ class Physical; * pure virtual integrator class that holds cached matrix information that * really should be common to any possible child implementation. */ -class EXPCL_PANDAPHYSICS BaseIntegrator : public ReferenceCount { +class EXPCL_PANDA_PHYSICS BaseIntegrator : public ReferenceCount { public: typedef epvector MatrixVector; typedef pvector LinearForceVector; diff --git a/panda/src/physics/config_physics.cxx b/panda/src/physics/config_physics.cxx index 5ce5c905f0..b4ad867f66 100644 --- a/panda/src/physics/config_physics.cxx +++ b/panda/src/physics/config_physics.cxx @@ -26,8 +26,8 @@ #include "dconfig.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAPHYSICS) - #error Buildsystem error: BUILDING_PANDAPHYSICS not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_PHYSICS) + #error Buildsystem error: BUILDING_PANDA_PHYSICS not defined #endif ConfigureDef(config_physics); diff --git a/panda/src/physics/config_physics.h b/panda/src/physics/config_physics.h index cfbbe5146b..1c1b768e83 100644 --- a/panda/src/physics/config_physics.h +++ b/panda/src/physics/config_physics.h @@ -18,10 +18,10 @@ #include "notifyCategoryProxy.h" #include "dconfig.h" -ConfigureDecl(config_physics, EXPCL_PANDAPHYSICS, EXPTP_PANDAPHYSICS); -NotifyCategoryDecl(physics, EXPCL_PANDAPHYSICS, EXPTP_PANDAPHYSICS); +ConfigureDecl(config_physics, EXPCL_PANDA_PHYSICS, EXPTP_PANDA_PHYSICS); +NotifyCategoryDecl(physics, EXPCL_PANDA_PHYSICS, EXPTP_PANDA_PHYSICS); -extern EXPCL_PANDAPHYSICS void init_libphysics(); +extern EXPCL_PANDA_PHYSICS void init_libphysics(); // These macros get stripped out in a non-debug build (like asserts). Use them // like cout but with paranthesis aroud the cout input. e.g. foo_debug("The diff --git a/panda/src/physics/forceNode.h b/panda/src/physics/forceNode.h index 851b54259b..0f7758199d 100644 --- a/panda/src/physics/forceNode.h +++ b/panda/src/physics/forceNode.h @@ -24,7 +24,7 @@ * coordinate systems. An example of this would be simulating gravity in a * rotating space station. or something. */ -class EXPCL_PANDAPHYSICS ForceNode : public PandaNode { +class EXPCL_PANDA_PHYSICS ForceNode : public PandaNode { PUBLISHED: explicit ForceNode(const std::string &name); INLINE void clear(); diff --git a/panda/src/physics/linearControlForce.h b/panda/src/physics/linearControlForce.h index e769abbaa8..30c255b769 100644 --- a/panda/src/physics/linearControlForce.h +++ b/panda/src/physics/linearControlForce.h @@ -22,7 +22,7 @@ * not make sense for a physics simulation, but it's very handy for a game. * I.e. this is the force applied by user on the selected object. */ -class EXPCL_PANDAPHYSICS LinearControlForce : public LinearForce { +class EXPCL_PANDA_PHYSICS LinearControlForce : public LinearForce { PUBLISHED: explicit LinearControlForce(const PhysicsObject *po = 0, PN_stdfloat a = 1.0f, bool mass = false); diff --git a/panda/src/physics/linearCylinderVortexForce.h b/panda/src/physics/linearCylinderVortexForce.h index d41b4b638a..41c7a554f1 100644 --- a/panda/src/physics/linearCylinderVortexForce.h +++ b/panda/src/physics/linearCylinderVortexForce.h @@ -23,7 +23,7 @@ * warned- this will suck anything that it can reach directly into orbit and * will NOT let go. */ -class EXPCL_PANDAPHYSICS LinearCylinderVortexForce : public LinearForce { +class EXPCL_PANDA_PHYSICS LinearCylinderVortexForce : public LinearForce { PUBLISHED: explicit LinearCylinderVortexForce(PN_stdfloat radius = 1.0f, PN_stdfloat length = 0.0f, diff --git a/panda/src/physics/linearDistanceForce.h b/panda/src/physics/linearDistanceForce.h index 52f30411d4..fa245db104 100644 --- a/panda/src/physics/linearDistanceForce.h +++ b/panda/src/physics/linearDistanceForce.h @@ -21,7 +21,7 @@ class BamReader; /** * Pure virtual class for sinks and sources */ -class EXPCL_PANDAPHYSICS LinearDistanceForce : public LinearForce { +class EXPCL_PANDA_PHYSICS LinearDistanceForce : public LinearForce { PUBLISHED: enum FalloffType { FT_ONE_OVER_R, diff --git a/panda/src/physics/linearEulerIntegrator.h b/panda/src/physics/linearEulerIntegrator.h index 69c6d67649..09430d863d 100644 --- a/panda/src/physics/linearEulerIntegrator.h +++ b/panda/src/physics/linearEulerIntegrator.h @@ -20,7 +20,7 @@ * Performs Euler integration on a vector of physically modelable objects * given a quantum dt. */ -class EXPCL_PANDAPHYSICS LinearEulerIntegrator : public LinearIntegrator { +class EXPCL_PANDA_PHYSICS LinearEulerIntegrator : public LinearIntegrator { PUBLISHED: LinearEulerIntegrator(); virtual ~LinearEulerIntegrator(); diff --git a/panda/src/physics/linearForce.h b/panda/src/physics/linearForce.h index a3208d6e90..b555c99ca8 100644 --- a/panda/src/physics/linearForce.h +++ b/panda/src/physics/linearForce.h @@ -20,7 +20,7 @@ * A force that acts on a PhysicsObject by way of an Integrator. This is a * pure virtual base class. */ -class EXPCL_PANDAPHYSICS LinearForce : public BaseForce { +class EXPCL_PANDA_PHYSICS LinearForce : public BaseForce { PUBLISHED: ~LinearForce(); diff --git a/panda/src/physics/linearFrictionForce.h b/panda/src/physics/linearFrictionForce.h index 7a3dd86bef..cc098c4cce 100644 --- a/panda/src/physics/linearFrictionForce.h +++ b/panda/src/physics/linearFrictionForce.h @@ -19,7 +19,7 @@ /** * Friction-based drag force */ -class EXPCL_PANDAPHYSICS LinearFrictionForce : public LinearForce { +class EXPCL_PANDA_PHYSICS LinearFrictionForce : public LinearForce { PUBLISHED: explicit LinearFrictionForce(PN_stdfloat coef = 1.0f, PN_stdfloat a = 1.0f, bool m = false); LinearFrictionForce(const LinearFrictionForce ©); diff --git a/panda/src/physics/linearIntegrator.h b/panda/src/physics/linearIntegrator.h index 4d0eca841b..4737ae7014 100644 --- a/panda/src/physics/linearIntegrator.h +++ b/panda/src/physics/linearIntegrator.h @@ -23,7 +23,7 @@ * Pure virtual base class for physical modeling. Takes physically modelable * objects and applies forces to them. */ -class EXPCL_PANDAPHYSICS LinearIntegrator : public BaseIntegrator { +class EXPCL_PANDA_PHYSICS LinearIntegrator : public BaseIntegrator { PUBLISHED: virtual ~LinearIntegrator(); public: diff --git a/panda/src/physics/linearJitterForce.h b/panda/src/physics/linearJitterForce.h index 79dd49be85..32433a3f66 100644 --- a/panda/src/physics/linearJitterForce.h +++ b/panda/src/physics/linearJitterForce.h @@ -20,7 +20,7 @@ * Completely random noise force vector. Not repeatable, reliable, or * predictable. */ -class EXPCL_PANDAPHYSICS LinearJitterForce : public LinearRandomForce { +class EXPCL_PANDA_PHYSICS LinearJitterForce : public LinearRandomForce { PUBLISHED: explicit LinearJitterForce(PN_stdfloat a = 1.0f, bool m = false); LinearJitterForce(const LinearJitterForce ©); diff --git a/panda/src/physics/linearNoiseForce.h b/panda/src/physics/linearNoiseForce.h index 1fae5f1217..cfe63183bc 100644 --- a/panda/src/physics/linearNoiseForce.h +++ b/panda/src/physics/linearNoiseForce.h @@ -21,7 +21,7 @@ /** * Repeating noise force vector. */ -class EXPCL_PANDAPHYSICS LinearNoiseForce : public LinearRandomForce { +class EXPCL_PANDA_PHYSICS LinearNoiseForce : public LinearRandomForce { PUBLISHED: explicit LinearNoiseForce(PN_stdfloat a = 1.0f, bool m = false); LinearNoiseForce(const LinearNoiseForce ©); diff --git a/panda/src/physics/linearRandomForce.h b/panda/src/physics/linearRandomForce.h index 7f097ca53a..c637f4a794 100644 --- a/panda/src/physics/linearRandomForce.h +++ b/panda/src/physics/linearRandomForce.h @@ -22,7 +22,7 @@ /** * Pure virtual, parent to noiseForce and jitterForce */ -class EXPCL_PANDAPHYSICS LinearRandomForce : public LinearForce { +class EXPCL_PANDA_PHYSICS LinearRandomForce : public LinearForce { PUBLISHED: virtual ~LinearRandomForce(); diff --git a/panda/src/physics/linearSinkForce.h b/panda/src/physics/linearSinkForce.h index 235085b253..9268e0cdd9 100644 --- a/panda/src/physics/linearSinkForce.h +++ b/panda/src/physics/linearSinkForce.h @@ -19,7 +19,7 @@ /** * Attractor force. Think black hole. */ -class EXPCL_PANDAPHYSICS LinearSinkForce : public LinearDistanceForce { +class EXPCL_PANDA_PHYSICS LinearSinkForce : public LinearDistanceForce { PUBLISHED: explicit LinearSinkForce(const LPoint3& p, FalloffType f, PN_stdfloat r, PN_stdfloat a = 1.0f, bool m = true); diff --git a/panda/src/physics/linearSourceForce.h b/panda/src/physics/linearSourceForce.h index 52af5ee9c6..70e764a468 100644 --- a/panda/src/physics/linearSourceForce.h +++ b/panda/src/physics/linearSourceForce.h @@ -19,7 +19,7 @@ /** * Repellant force. */ -class EXPCL_PANDAPHYSICS LinearSourceForce : public LinearDistanceForce { +class EXPCL_PANDA_PHYSICS LinearSourceForce : public LinearDistanceForce { PUBLISHED: explicit LinearSourceForce(const LPoint3& p, FalloffType f, PN_stdfloat r, PN_stdfloat a = 1.0f, bool mass = true); diff --git a/panda/src/physics/linearUserDefinedForce.h b/panda/src/physics/linearUserDefinedForce.h index 2908313095..e7be671950 100644 --- a/panda/src/physics/linearUserDefinedForce.h +++ b/panda/src/physics/linearUserDefinedForce.h @@ -19,7 +19,7 @@ /** * A programmable force that takes an evaluator function. */ -class EXPCL_PANDAPHYSICS LinearUserDefinedForce : public LinearForce { +class EXPCL_PANDA_PHYSICS LinearUserDefinedForce : public LinearForce { PUBLISHED: explicit LinearUserDefinedForce(LVector3 (*proc)(const PhysicsObject *) = nullptr, PN_stdfloat a = 1.0f, bool md = false); diff --git a/panda/src/physics/linearVectorForce.h b/panda/src/physics/linearVectorForce.h index 75d624cb64..e68f4599da 100644 --- a/panda/src/physics/linearVectorForce.h +++ b/panda/src/physics/linearVectorForce.h @@ -20,7 +20,7 @@ * Simple directed vector force. Suitable for gravity, non-turbulent wind, * etc... */ -class EXPCL_PANDAPHYSICS LinearVectorForce : public LinearForce { +class EXPCL_PANDA_PHYSICS LinearVectorForce : public LinearForce { PUBLISHED: explicit LinearVectorForce(const LVector3& vec, PN_stdfloat a = 1.0f, bool mass = false); explicit LinearVectorForce(PN_stdfloat x = 0.0f, PN_stdfloat y = 0.0f, PN_stdfloat z = 0.0f, diff --git a/panda/src/physics/physical.h b/panda/src/physics/physical.h index 3ab30e9ee4..fd3b9c343a 100644 --- a/panda/src/physics/physical.h +++ b/panda/src/physics/physical.h @@ -34,7 +34,7 @@ class PhysicsManager; * Defines a set of physically modeled attributes. If you want physics * applied to your class, derive it from this. */ -class EXPCL_PANDAPHYSICS Physical : public TypedReferenceCount { +class EXPCL_PANDA_PHYSICS Physical : public TypedReferenceCount { public: // typedef pvector PhysicsObjectVector; typedef pvector LinearForceVector; diff --git a/panda/src/physics/physicalNode.h b/panda/src/physics/physicalNode.h index 57ea5026f6..f88d79dda6 100644 --- a/panda/src/physics/physicalNode.h +++ b/panda/src/physics/physicalNode.h @@ -25,7 +25,7 @@ /** * Graph node that encapsulated a series of physical objects */ -class EXPCL_PANDAPHYSICS PhysicalNode : public PandaNode { +class EXPCL_PANDA_PHYSICS PhysicalNode : public PandaNode { PUBLISHED: explicit PhysicalNode(const std::string &name); INLINE void clear(); diff --git a/panda/src/physics/physicsCollisionHandler.h b/panda/src/physics/physicsCollisionHandler.h index 8811a88756..febcede789 100644 --- a/panda/src/physics/physicsCollisionHandler.h +++ b/panda/src/physics/physicsCollisionHandler.h @@ -23,7 +23,7 @@ * that attempt to move into solid walls. This also puts forces onto the * physics objects */ -class EXPCL_PANDAPHYSICS PhysicsCollisionHandler : +class EXPCL_PANDA_PHYSICS PhysicsCollisionHandler : public CollisionHandlerPusher { PUBLISHED: PhysicsCollisionHandler(); diff --git a/panda/src/physics/physicsManager.h b/panda/src/physics/physicsManager.h index 0dc3ef2c51..b9ca9adf49 100644 --- a/panda/src/physics/physicsManager.h +++ b/panda/src/physics/physicsManager.h @@ -33,7 +33,7 @@ * Physics don't get much higher-level than this. Attach as many Physicals * (particle systems, etc..) as you want, pick an integrator and go. */ -class EXPCL_PANDAPHYSICS PhysicsManager { +class EXPCL_PANDA_PHYSICS PhysicsManager { public: // NOTE that the physicals container is NOT reference counted. this does // indeed mean that you are NOT supposed to use this as a primary storage diff --git a/panda/src/physics/physicsObject.h b/panda/src/physics/physicsObject.h index c2a0dc24bd..a36eb2660f 100644 --- a/panda/src/physics/physicsObject.h +++ b/panda/src/physics/physicsObject.h @@ -24,7 +24,7 @@ * motion to your class, do NOT derive from this. Derive from Physical * instead. */ -class EXPCL_PANDAPHYSICS PhysicsObject : public TypedReferenceCount { +class EXPCL_PANDA_PHYSICS PhysicsObject : public TypedReferenceCount { public: typedef pvector Vector; diff --git a/panda/src/physics/physicsObjectCollection.h b/panda/src/physics/physicsObjectCollection.h index b41f5e6cc2..8a69d49073 100644 --- a/panda/src/physics/physicsObjectCollection.h +++ b/panda/src/physics/physicsObjectCollection.h @@ -22,7 +22,7 @@ * This is a set of zero or more PhysicsObjects. It's handy for returning * from functions that need to return multiple PhysicsObjects. */ -class EXPCL_PANDAPHYSICS PhysicsObjectCollection { +class EXPCL_PANDA_PHYSICS PhysicsObjectCollection { PUBLISHED: PhysicsObjectCollection(); PhysicsObjectCollection(const PhysicsObjectCollection ©); From 768f78306a3341515e5aab442554a6bf51876cec Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 10 Jun 2018 19:24:53 -0600 Subject: [PATCH 12/14] general: Break apart BUILDING_PANDAEGG --- panda/src/egg/config_egg.cxx | 4 +- panda/src/egg/config_egg.h | 32 +++++++-------- panda/src/egg/eggAnimData.h | 2 +- panda/src/egg/eggAnimPreload.h | 2 +- panda/src/egg/eggAttributes.h | 2 +- panda/src/egg/eggBin.h | 2 +- panda/src/egg/eggBinMaker.h | 4 +- panda/src/egg/eggComment.h | 2 +- panda/src/egg/eggCompositePrimitive.h | 2 +- panda/src/egg/eggCoordinateSystem.h | 2 +- panda/src/egg/eggCurve.h | 2 +- panda/src/egg/eggData.h | 2 +- panda/src/egg/eggExternalReference.h | 2 +- panda/src/egg/eggFilenameNode.h | 2 +- panda/src/egg/eggGroup.h | 2 +- panda/src/egg/eggGroupNode.h | 2 +- panda/src/egg/eggGroupUniquifier.h | 2 +- panda/src/egg/eggLine.h | 2 +- panda/src/egg/eggMaterial.h | 4 +- panda/src/egg/eggMaterialCollection.h | 2 +- panda/src/egg/eggMorph.h | 4 +- panda/src/egg/eggMorphList.cxx | 12 +++--- panda/src/egg/eggNameUniquifier.h | 2 +- panda/src/egg/eggNamedObject.h | 2 +- panda/src/egg/eggNode.h | 2 +- panda/src/egg/eggNurbsCurve.h | 2 +- panda/src/egg/eggNurbsSurface.h | 2 +- panda/src/egg/eggObject.h | 2 +- panda/src/egg/eggParameters.h | 4 +- panda/src/egg/eggPatch.h | 2 +- panda/src/egg/eggPoint.h | 2 +- panda/src/egg/eggPolygon.h | 2 +- panda/src/egg/eggPolysetMaker.h | 2 +- panda/src/egg/eggPoolUniquifier.h | 2 +- panda/src/egg/eggPrimitive.h | 2 +- panda/src/egg/eggRenderMode.h | 12 +++--- panda/src/egg/eggSAnimData.h | 2 +- panda/src/egg/eggSurface.h | 2 +- panda/src/egg/eggSwitchCondition.h | 4 +- panda/src/egg/eggTable.h | 2 +- panda/src/egg/eggTexture.h | 28 ++++++------- panda/src/egg/eggTextureCollection.h | 2 +- panda/src/egg/eggTransform.h | 2 +- panda/src/egg/eggTriangleFan.h | 2 +- panda/src/egg/eggTriangleStrip.h | 2 +- panda/src/egg/eggUserData.h | 2 +- panda/src/egg/eggVertex.h | 4 +- panda/src/egg/eggVertexAux.h | 2 +- panda/src/egg/eggVertexPool.h | 2 +- panda/src/egg/eggVertexUV.h | 2 +- panda/src/egg/eggXfmAnimData.h | 2 +- panda/src/egg/eggXfmSAnim.h | 2 +- panda/src/egg/parserDefs.h | 2 +- panda/src/egg/pt_EggMaterial.h | 6 +-- panda/src/egg/pt_EggTexture.h | 6 +-- panda/src/egg/pt_EggVertex.h | 6 +-- panda/src/egg/vector_PT_EggMaterial.h | 4 +- panda/src/egg/vector_PT_EggTexture.h | 4 +- panda/src/egg/vector_PT_EggVertex.cxx | 4 +- panda/src/egg/vector_PT_EggVertex.h | 4 +- panda/src/egg2pg/animBundleMaker.h | 2 +- panda/src/egg2pg/characterMaker.h | 2 +- panda/src/egg2pg/config_egg2pg.cxx | 4 +- panda/src/egg2pg/config_egg2pg.h | 58 +++++++++++++-------------- panda/src/egg2pg/egg_parametrics.h | 4 +- panda/src/egg2pg/load_egg_file.h | 4 +- panda/src/egg2pg/loaderFileTypeEgg.h | 2 +- panda/src/egg2pg/save_egg_file.h | 4 +- panda/src/pandabase/pandasymbols.h | 22 ++++++++++ 69 files changed, 177 insertions(+), 155 deletions(-) diff --git a/panda/src/egg/config_egg.cxx b/panda/src/egg/config_egg.cxx index 65e08efcbc..ec0009819f 100644 --- a/panda/src/egg/config_egg.cxx +++ b/panda/src/egg/config_egg.cxx @@ -58,8 +58,8 @@ #include "dconfig.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAEGG) - #error Buildsystem error: BUILDING_PANDAEGG not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_EGG) + #error Buildsystem error: BUILDING_PANDA_EGG not defined #endif Configure(config_egg); diff --git a/panda/src/egg/config_egg.h b/panda/src/egg/config_egg.h index 1df45a4359..a9d67f8460 100644 --- a/panda/src/egg/config_egg.h +++ b/panda/src/egg/config_egg.h @@ -22,26 +22,26 @@ #include "configVariableDouble.h" #include "configVariableInt.h" -NotifyCategoryDecl(egg, EXPCL_PANDAEGG, EXPTP_PANDAEGG); +NotifyCategoryDecl(egg, EXPCL_PANDA_EGG, EXPTP_PANDA_EGG); extern ConfigVariableBool egg_support_old_anims; -extern EXPCL_PANDAEGG ConfigVariableBool egg_mesh; -extern EXPCL_PANDAEGG ConfigVariableBool egg_retesselate_coplanar; -extern EXPCL_PANDAEGG ConfigVariableBool egg_unroll_fans; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_tstrips; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_qsheets; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_quads; +extern EXPCL_PANDA_EGG ConfigVariableBool egg_mesh; +extern EXPCL_PANDA_EGG ConfigVariableBool egg_retesselate_coplanar; +extern EXPCL_PANDA_EGG ConfigVariableBool egg_unroll_fans; +extern EXPCL_PANDA_EGG ConfigVariableBool egg_show_tstrips; +extern EXPCL_PANDA_EGG ConfigVariableBool egg_show_qsheets; +extern EXPCL_PANDA_EGG ConfigVariableBool egg_show_quads; #define egg_false_color (egg_show_tstrips | egg_show_qsheets | egg_show_quads) -extern EXPCL_PANDAEGG ConfigVariableBool egg_subdivide_polys; -extern EXPCL_PANDAEGG ConfigVariableBool egg_consider_fans; -extern EXPCL_PANDAEGG ConfigVariableDouble egg_max_tfan_angle; -extern EXPCL_PANDAEGG ConfigVariableInt egg_min_tfan_tris; -extern EXPCL_PANDAEGG ConfigVariableDouble egg_coplanar_threshold; -extern EXPCL_PANDAEGG ConfigVariableInt egg_test_vref_integrity; -extern EXPCL_PANDAEGG ConfigVariableInt egg_recursion_limit; -extern EXPCL_PANDAEGG ConfigVariableInt egg_precision; +extern EXPCL_PANDA_EGG ConfigVariableBool egg_subdivide_polys; +extern EXPCL_PANDA_EGG ConfigVariableBool egg_consider_fans; +extern EXPCL_PANDA_EGG ConfigVariableDouble egg_max_tfan_angle; +extern EXPCL_PANDA_EGG ConfigVariableInt egg_min_tfan_tris; +extern EXPCL_PANDA_EGG ConfigVariableDouble egg_coplanar_threshold; +extern EXPCL_PANDA_EGG ConfigVariableInt egg_test_vref_integrity; +extern EXPCL_PANDA_EGG ConfigVariableInt egg_recursion_limit; +extern EXPCL_PANDA_EGG ConfigVariableInt egg_precision; -extern EXPCL_PANDAEGG void init_libegg(); +extern EXPCL_PANDA_EGG void init_libegg(); #endif diff --git a/panda/src/egg/eggAnimData.h b/panda/src/egg/eggAnimData.h index 05bdc3669a..9bcb68030b 100644 --- a/panda/src/egg/eggAnimData.h +++ b/panda/src/egg/eggAnimData.h @@ -27,7 +27,7 @@ * A base class for EggSAnimData and EggXfmAnimData, which contain rows and * columns of numbers. */ -class EXPCL_PANDAEGG EggAnimData : public EggNode { +class EXPCL_PANDA_EGG EggAnimData : public EggNode { PUBLISHED: INLINE explicit EggAnimData(const std::string &name = ""); INLINE EggAnimData(const EggAnimData ©); diff --git a/panda/src/egg/eggAnimPreload.h b/panda/src/egg/eggAnimPreload.h index 577901cac5..e2b52a5c64 100644 --- a/panda/src/egg/eggAnimPreload.h +++ b/panda/src/egg/eggAnimPreload.h @@ -21,7 +21,7 @@ /** * This corresponds to an entry. */ -class EXPCL_PANDAEGG EggAnimPreload : public EggNode { +class EXPCL_PANDA_EGG EggAnimPreload : public EggNode { PUBLISHED: INLINE explicit EggAnimPreload(const std::string &name = ""); INLINE EggAnimPreload(const EggAnimPreload ©); diff --git a/panda/src/egg/eggAttributes.h b/panda/src/egg/eggAttributes.h index 1ff0833d7e..d0fa35dfd3 100644 --- a/panda/src/egg/eggAttributes.h +++ b/panda/src/egg/eggAttributes.h @@ -30,7 +30,7 @@ * EggPolygon level with multiple appearances of the EggObject base class. * And making EggObject a virtual base class is just no fun. */ -class EXPCL_PANDAEGG EggAttributes : public MemoryBase { +class EXPCL_PANDA_EGG EggAttributes : public MemoryBase { PUBLISHED: EggAttributes(); EggAttributes(const EggAttributes ©); diff --git a/panda/src/egg/eggBin.h b/panda/src/egg/eggBin.h index e069a44af1..d6b09dde22 100644 --- a/panda/src/egg/eggBin.h +++ b/panda/src/egg/eggBin.h @@ -23,7 +23,7 @@ * of node that will never be read in from an egg file, but can only exist in * the egg scene graph if it is created via the use of an EggBinMaker. */ -class EXPCL_PANDAEGG EggBin : public EggGroup { +class EXPCL_PANDA_EGG EggBin : public EggGroup { PUBLISHED: explicit EggBin(const std::string &name = ""); EggBin(const EggGroup ©); diff --git a/panda/src/egg/eggBinMaker.h b/panda/src/egg/eggBinMaker.h index 06590cd0c4..02f3dbb43f 100644 --- a/panda/src/egg/eggBinMaker.h +++ b/panda/src/egg/eggBinMaker.h @@ -139,7 +139,7 @@ class EggBinMaker; * This is just an STL function object, used to sort nodes within EggBinMaker. * It's part of the private interface; ignore it. */ -class EXPCL_PANDAEGG EggBinMakerCompareNodes { +class EXPCL_PANDA_EGG EggBinMakerCompareNodes { public: EggBinMakerCompareNodes() { // We need to have a default constructor to compile, but it should never @@ -158,7 +158,7 @@ public: * abstract class; to use it you must subclass off of it. See the somewhat * lengthy comment above. */ -class EXPCL_PANDAEGG EggBinMaker : public EggObject { +class EXPCL_PANDA_EGG EggBinMaker : public EggObject { PUBLISHED: EggBinMaker(); ~EggBinMaker(); diff --git a/panda/src/egg/eggComment.h b/panda/src/egg/eggComment.h index 491ecdf6ba..17611ed5d5 100644 --- a/panda/src/egg/eggComment.h +++ b/panda/src/egg/eggComment.h @@ -21,7 +21,7 @@ /** * A comment that appears in an egg file within a entry. */ -class EXPCL_PANDAEGG EggComment : public EggNode { +class EXPCL_PANDA_EGG EggComment : public EggNode { PUBLISHED: INLINE explicit EggComment(const std::string &node_name, const std::string &comment); INLINE EggComment(const EggComment ©); diff --git a/panda/src/egg/eggCompositePrimitive.h b/panda/src/egg/eggCompositePrimitive.h index 4cde1084bf..d7e169624b 100644 --- a/panda/src/egg/eggCompositePrimitive.h +++ b/panda/src/egg/eggCompositePrimitive.h @@ -23,7 +23,7 @@ * which include several component triangles, each of which might have its own * color and/or normal. */ -class EXPCL_PANDAEGG EggCompositePrimitive : public EggPrimitive { +class EXPCL_PANDA_EGG EggCompositePrimitive : public EggPrimitive { PUBLISHED: INLINE explicit EggCompositePrimitive(const std::string &name = ""); INLINE EggCompositePrimitive(const EggCompositePrimitive ©); diff --git a/panda/src/egg/eggCoordinateSystem.h b/panda/src/egg/eggCoordinateSystem.h index 0d4575a708..54a76e6f78 100644 --- a/panda/src/egg/eggCoordinateSystem.h +++ b/panda/src/egg/eggCoordinateSystem.h @@ -26,7 +26,7 @@ * with the enum EggData::CoordinateSystem, which is the value contained by * this entry. */ -class EXPCL_PANDAEGG EggCoordinateSystem : public EggNode { +class EXPCL_PANDA_EGG EggCoordinateSystem : public EggNode { PUBLISHED: INLINE EggCoordinateSystem(CoordinateSystem value = CS_default); INLINE EggCoordinateSystem(const EggCoordinateSystem ©); diff --git a/panda/src/egg/eggCurve.h b/panda/src/egg/eggCurve.h index 6bbcb64ea5..736869fbdb 100644 --- a/panda/src/egg/eggCurve.h +++ b/panda/src/egg/eggCurve.h @@ -21,7 +21,7 @@ /** * A parametric curve of some kind. See EggNurbsCurve. */ -class EXPCL_PANDAEGG EggCurve : public EggPrimitive { +class EXPCL_PANDA_EGG EggCurve : public EggPrimitive { PUBLISHED: INLINE explicit EggCurve(const std::string &name = ""); INLINE EggCurve(const EggCurve ©); diff --git a/panda/src/egg/eggData.h b/panda/src/egg/eggData.h index 4b49ba5f90..ad5d3a9917 100644 --- a/panda/src/egg/eggData.h +++ b/panda/src/egg/eggData.h @@ -34,7 +34,7 @@ class BamCacheRecord; * begin() and end() calls. The children of the EggData class are the * toplevel nodes in the egg file. */ -class EXPCL_PANDAEGG EggData : public EggGroupNode { +class EXPCL_PANDA_EGG EggData : public EggGroupNode { PUBLISHED: INLINE EggData(); INLINE EggData(const EggData ©); diff --git a/panda/src/egg/eggExternalReference.h b/panda/src/egg/eggExternalReference.h index ff4f332740..d19879397d 100644 --- a/panda/src/egg/eggExternalReference.h +++ b/panda/src/egg/eggExternalReference.h @@ -22,7 +22,7 @@ * Defines a reference to another egg file which should be inserted at this * point. */ -class EXPCL_PANDAEGG EggExternalReference : public EggFilenameNode { +class EXPCL_PANDA_EGG EggExternalReference : public EggFilenameNode { PUBLISHED: explicit EggExternalReference(const std::string &node_name, const std::string &filename); EggExternalReference(const EggExternalReference ©); diff --git a/panda/src/egg/eggFilenameNode.h b/panda/src/egg/eggFilenameNode.h index 3eda6ace36..ee98f8d091 100644 --- a/panda/src/egg/eggFilenameNode.h +++ b/panda/src/egg/eggFilenameNode.h @@ -24,7 +24,7 @@ * file relative to the directory the egg file was loaded in. It is a base * class for EggTexture and EggExternalReference. */ -class EXPCL_PANDAEGG EggFilenameNode : public EggNode { +class EXPCL_PANDA_EGG EggFilenameNode : public EggNode { PUBLISHED: INLINE EggFilenameNode(); INLINE explicit EggFilenameNode(const std::string &node_name, const Filename &filename); diff --git a/panda/src/egg/eggGroup.h b/panda/src/egg/eggGroup.h index bc4d095150..14485dcc24 100644 --- a/panda/src/egg/eggGroup.h +++ b/panda/src/egg/eggGroup.h @@ -31,7 +31,7 @@ * The main glue of the egg hierarchy, this corresponds to the , * , and type nodes. */ -class EXPCL_PANDAEGG EggGroup : public EggGroupNode, public EggRenderMode, public EggTransform { +class EXPCL_PANDA_EGG EggGroup : public EggGroupNode, public EggRenderMode, public EggTransform { PUBLISHED: typedef pmap VertexRef; typedef pmap TagData; diff --git a/panda/src/egg/eggGroupNode.h b/panda/src/egg/eggGroupNode.h index b8e361e97e..346c2ed817 100644 --- a/panda/src/egg/eggGroupNode.h +++ b/panda/src/egg/eggGroupNode.h @@ -43,7 +43,7 @@ class DSearchPath; * to manipulate the list. The list may also be operated on (read-only) via * iterators and begin()/end(). */ -class EXPCL_PANDAEGG EggGroupNode : public EggNode { +class EXPCL_PANDA_EGG EggGroupNode : public EggNode { // This is a bit of private interface stuff that must be here as a forward // reference. This allows us to define the EggGroupNode as an STL diff --git a/panda/src/egg/eggGroupUniquifier.h b/panda/src/egg/eggGroupUniquifier.h index cacabcb06e..4c8c142d1a 100644 --- a/panda/src/egg/eggGroupUniquifier.h +++ b/panda/src/egg/eggGroupUniquifier.h @@ -23,7 +23,7 @@ * EggGroup nodes. It's not called automatically; you must invoke it yourself * if you want it. */ -class EXPCL_PANDAEGG EggGroupUniquifier : public EggNameUniquifier { +class EXPCL_PANDA_EGG EggGroupUniquifier : public EggNameUniquifier { PUBLISHED: explicit EggGroupUniquifier(bool filter_names = true); diff --git a/panda/src/egg/eggLine.h b/panda/src/egg/eggLine.h index 09ce5a22c8..e4c67ff279 100644 --- a/panda/src/egg/eggLine.h +++ b/panda/src/egg/eggLine.h @@ -22,7 +22,7 @@ * A line segment, or a series of connected line segments, defined by a * entry. */ -class EXPCL_PANDAEGG EggLine : public EggCompositePrimitive { +class EXPCL_PANDA_EGG EggLine : public EggCompositePrimitive { PUBLISHED: INLINE explicit EggLine(const std::string &name = ""); INLINE EggLine(const EggLine ©); diff --git a/panda/src/egg/eggMaterial.h b/panda/src/egg/eggMaterial.h index 19dc055185..6d9f979848 100644 --- a/panda/src/egg/eggMaterial.h +++ b/panda/src/egg/eggMaterial.h @@ -23,7 +23,7 @@ /** * */ -class EXPCL_PANDAEGG EggMaterial : public EggNode { +class EXPCL_PANDA_EGG EggMaterial : public EggNode { PUBLISHED: explicit EggMaterial(const std::string &mref_name); EggMaterial(const EggMaterial ©); @@ -151,7 +151,7 @@ private: * Returns true if the two referenced EggMaterial pointers are in sorted * order, false otherwise. */ -class EXPCL_PANDAEGG UniqueEggMaterials { +class EXPCL_PANDA_EGG UniqueEggMaterials { public: INLINE UniqueEggMaterials(int eq = ~0); INLINE bool operator ()(const EggMaterial *t1, const EggMaterial *t2) const; diff --git a/panda/src/egg/eggMaterialCollection.h b/panda/src/egg/eggMaterialCollection.h index bc712704a8..9f4d196b62 100644 --- a/panda/src/egg/eggMaterialCollection.h +++ b/panda/src/egg/eggMaterialCollection.h @@ -27,7 +27,7 @@ * materials from an egg file and sort them all together; it can also manage * the creation of unique materials and the assignment of unique MRef names. */ -class EXPCL_PANDAEGG EggMaterialCollection { +class EXPCL_PANDA_EGG EggMaterialCollection { // This is a bit of private interface stuff that must be here as a forward // reference. This allows us to define the EggMaterialCollection as an STL diff --git a/panda/src/egg/eggMorph.h b/panda/src/egg/eggMorph.h index 482b612a6e..29c42cecab 100644 --- a/panda/src/egg/eggMorph.h +++ b/panda/src/egg/eggMorph.h @@ -49,8 +49,8 @@ private: // I'd love to export these, but it produces a strange linker issue with Mac // OS X's version of GCC. We'll do it only on Windows, then. #ifdef _MSC_VER -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorph); -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorph); +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, EggMorph); +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, EggMorph); #endif typedef EggMorph EggMorphVertex; diff --git a/panda/src/egg/eggMorphList.cxx b/panda/src/egg/eggMorphList.cxx index eb5a12a9b1..01172b9f17 100644 --- a/panda/src/egg/eggMorphList.cxx +++ b/panda/src/egg/eggMorphList.cxx @@ -15,20 +15,20 @@ // Continue all of the vector import definitions. -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDA_EGG +#define EXPTP EXPTP_PANDA_EGG #define TYPE LVector3d #define NAME vector_LVector3d #include "vector_src.cxx" -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDA_EGG +#define EXPTP EXPTP_PANDA_EGG #define TYPE LVector2d #define NAME vector_LVector2d #include "vector_src.cxx" -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDA_EGG +#define EXPTP EXPTP_PANDA_EGG #define TYPE LVector4 #define NAME vector_LVector4 #include "vector_src.cxx" diff --git a/panda/src/egg/eggNameUniquifier.h b/panda/src/egg/eggNameUniquifier.h index ff0c17c00f..4b1f0f48d0 100644 --- a/panda/src/egg/eggNameUniquifier.h +++ b/panda/src/egg/eggNameUniquifier.h @@ -56,7 +56,7 @@ class EggNode; * hierarchy. It is an abstract class; to use it you must subclass off of it. * See the comment above. */ -class EXPCL_PANDAEGG EggNameUniquifier : public EggObject { +class EXPCL_PANDA_EGG EggNameUniquifier : public EggObject { PUBLISHED: EggNameUniquifier(); ~EggNameUniquifier(); diff --git a/panda/src/egg/eggNamedObject.h b/panda/src/egg/eggNamedObject.h index 0b3588d87b..880dd0ca2d 100644 --- a/panda/src/egg/eggNamedObject.h +++ b/panda/src/egg/eggNamedObject.h @@ -23,7 +23,7 @@ /** * This is a fairly low-level base class--any egg object that has a name. */ -class EXPCL_PANDAEGG EggNamedObject : public EggObject, public Namable { +class EXPCL_PANDA_EGG EggNamedObject : public EggObject, public Namable { PUBLISHED: INLINE explicit EggNamedObject(const std::string &name = ""); INLINE EggNamedObject(const EggNamedObject ©); diff --git a/panda/src/egg/eggNode.h b/panda/src/egg/eggNode.h index 05191dabc5..c2d811859e 100644 --- a/panda/src/egg/eggNode.h +++ b/panda/src/egg/eggNode.h @@ -32,7 +32,7 @@ class EggTextureCollection; * This includes groups, joints, polygons, vertex pools, etc., but does not * include things like vertices. */ -class EXPCL_PANDAEGG EggNode : public EggNamedObject { +class EXPCL_PANDA_EGG EggNode : public EggNamedObject { PUBLISHED: INLINE explicit EggNode(const std::string &name = ""); INLINE EggNode(const EggNode ©); diff --git a/panda/src/egg/eggNurbsCurve.h b/panda/src/egg/eggNurbsCurve.h index dd62f6c5ab..33eeaaae26 100644 --- a/panda/src/egg/eggNurbsCurve.h +++ b/panda/src/egg/eggNurbsCurve.h @@ -23,7 +23,7 @@ /** * A parametric NURBS curve. */ -class EXPCL_PANDAEGG EggNurbsCurve : public EggCurve { +class EXPCL_PANDA_EGG EggNurbsCurve : public EggCurve { PUBLISHED: INLINE explicit EggNurbsCurve(const std::string &name = ""); INLINE EggNurbsCurve(const EggNurbsCurve ©); diff --git a/panda/src/egg/eggNurbsSurface.h b/panda/src/egg/eggNurbsSurface.h index 46d9c86357..329c50920c 100644 --- a/panda/src/egg/eggNurbsSurface.h +++ b/panda/src/egg/eggNurbsSurface.h @@ -24,7 +24,7 @@ /** * A parametric NURBS surface. */ -class EXPCL_PANDAEGG EggNurbsSurface : public EggSurface { +class EXPCL_PANDA_EGG EggNurbsSurface : public EggSurface { PUBLISHED: typedef plist< PT(EggNurbsCurve) > Curves; typedef Curves Loop; diff --git a/panda/src/egg/eggObject.h b/panda/src/egg/eggObject.h index f293b19503..71c68e51db 100644 --- a/panda/src/egg/eggObject.h +++ b/panda/src/egg/eggObject.h @@ -26,7 +26,7 @@ class EggTransform; * The highest-level base class in the egg directory. (Almost) all things egg * inherit from this. */ -class EXPCL_PANDAEGG EggObject : public TypedReferenceCount { +class EXPCL_PANDA_EGG EggObject : public TypedReferenceCount { PUBLISHED: EggObject(); EggObject(const EggObject ©); diff --git a/panda/src/egg/eggParameters.h b/panda/src/egg/eggParameters.h index 93b1aff8b0..600de3c17a 100644 --- a/panda/src/egg/eggParameters.h +++ b/panda/src/egg/eggParameters.h @@ -29,7 +29,7 @@ * process it, and write the egg file out again before resetting the * parameters again. */ -class EXPCL_PANDAEGG EggParameters { +class EXPCL_PANDA_EGG EggParameters { public: constexpr EggParameters() = default; @@ -54,6 +54,6 @@ public: double _table_threshold = 0.0001; }; -extern EXPCL_PANDAEGG EggParameters *egg_parameters; +extern EXPCL_PANDA_EGG EggParameters *egg_parameters; #endif diff --git a/panda/src/egg/eggPatch.h b/panda/src/egg/eggPatch.h index 67c94c100a..72530df4cb 100644 --- a/panda/src/egg/eggPatch.h +++ b/panda/src/egg/eggPatch.h @@ -22,7 +22,7 @@ * A single "patch", a special primitive to be rendered only with a * tessellation shader. */ -class EXPCL_PANDAEGG EggPatch : public EggPrimitive { +class EXPCL_PANDA_EGG EggPatch : public EggPrimitive { PUBLISHED: INLINE explicit EggPatch(const std::string &name = ""); INLINE EggPatch(const EggPatch ©); diff --git a/panda/src/egg/eggPoint.h b/panda/src/egg/eggPoint.h index fc1ed8d24c..5c113280c5 100644 --- a/panda/src/egg/eggPoint.h +++ b/panda/src/egg/eggPoint.h @@ -22,7 +22,7 @@ * A single point, or a collection of points as defined by a single * entry. */ -class EXPCL_PANDAEGG EggPoint : public EggPrimitive { +class EXPCL_PANDA_EGG EggPoint : public EggPrimitive { PUBLISHED: INLINE explicit EggPoint(const std::string &name = ""); INLINE EggPoint(const EggPoint ©); diff --git a/panda/src/egg/eggPolygon.h b/panda/src/egg/eggPolygon.h index 3629537814..ec3c236644 100644 --- a/panda/src/egg/eggPolygon.h +++ b/panda/src/egg/eggPolygon.h @@ -21,7 +21,7 @@ /** * A single polygon. */ -class EXPCL_PANDAEGG EggPolygon : public EggPrimitive { +class EXPCL_PANDA_EGG EggPolygon : public EggPrimitive { PUBLISHED: INLINE explicit EggPolygon(const std::string &name = ""); INLINE EggPolygon(const EggPolygon ©); diff --git a/panda/src/egg/eggPolysetMaker.h b/panda/src/egg/eggPolysetMaker.h index 5fa5eebc94..a104a41477 100644 --- a/panda/src/egg/eggPolysetMaker.h +++ b/panda/src/egg/eggPolysetMaker.h @@ -29,7 +29,7 @@ * these are not sufficient, you can always rederive your own further * specialization of this class. */ -class EXPCL_PANDAEGG EggPolysetMaker : public EggBinMaker { +class EXPCL_PANDA_EGG EggPolysetMaker : public EggBinMaker { PUBLISHED: // The BinNumber serves to identify why a particular EggBin was created. enum BinNumber { diff --git a/panda/src/egg/eggPoolUniquifier.h b/panda/src/egg/eggPoolUniquifier.h index 8fa0c328d0..a5d48f0813 100644 --- a/panda/src/egg/eggPoolUniquifier.h +++ b/panda/src/egg/eggPoolUniquifier.h @@ -23,7 +23,7 @@ * textures, materials, and vertex pools prior to writing out an egg file. * It's automatically called by EggData prior to writing out an egg file. */ -class EXPCL_PANDAEGG EggPoolUniquifier : public EggNameUniquifier { +class EXPCL_PANDA_EGG EggPoolUniquifier : public EggNameUniquifier { PUBLISHED: EggPoolUniquifier(); diff --git a/panda/src/egg/eggPrimitive.h b/panda/src/egg/eggPrimitive.h index d461762382..4b8a035952 100644 --- a/panda/src/egg/eggPrimitive.h +++ b/panda/src/egg/eggPrimitive.h @@ -44,7 +44,7 @@ class EggVertexPool; * can. However, it is necessary that all vertices belong to the same vertex * pool. */ -class EXPCL_PANDAEGG EggPrimitive : public EggNode, public EggAttributes, +class EXPCL_PANDA_EGG EggPrimitive : public EggNode, public EggAttributes, public EggRenderMode { diff --git a/panda/src/egg/eggRenderMode.h b/panda/src/egg/eggRenderMode.h index db18e5d47d..3730cde3da 100644 --- a/panda/src/egg/eggRenderMode.h +++ b/panda/src/egg/eggRenderMode.h @@ -28,7 +28,7 @@ * EggPolygon level with multiple appearances of the EggObject base class. * And making EggObject a virtual base class is just no fun. */ -class EXPCL_PANDAEGG EggRenderMode { +class EXPCL_PANDA_EGG EggRenderMode { PUBLISHED: EggRenderMode(); INLINE EggRenderMode(const EggRenderMode ©); @@ -122,12 +122,12 @@ private: static TypeHandle _type_handle; }; -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggRenderMode::AlphaMode mode); -EXPCL_PANDAEGG std::istream &operator >> (std::istream &in, EggRenderMode::AlphaMode &mode); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggRenderMode::AlphaMode mode); +EXPCL_PANDA_EGG std::istream &operator >> (std::istream &in, EggRenderMode::AlphaMode &mode); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggRenderMode::DepthWriteMode mode); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggRenderMode::DepthTestMode mode); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggRenderMode::VisibilityMode mode); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggRenderMode::DepthWriteMode mode); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggRenderMode::DepthTestMode mode); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggRenderMode::VisibilityMode mode); #include "eggRenderMode.I" diff --git a/panda/src/egg/eggSAnimData.h b/panda/src/egg/eggSAnimData.h index 681716f6b0..c1c28eb2c5 100644 --- a/panda/src/egg/eggSAnimData.h +++ b/panda/src/egg/eggSAnimData.h @@ -22,7 +22,7 @@ * Corresponding to an entry, this stores a single column of numbers, * for instance for a morph target, or as one column in an EggXfmSAnim. */ -class EXPCL_PANDAEGG EggSAnimData : public EggAnimData { +class EXPCL_PANDA_EGG EggSAnimData : public EggAnimData { PUBLISHED: INLINE explicit EggSAnimData(const std::string &name = ""); INLINE EggSAnimData(const EggSAnimData ©); diff --git a/panda/src/egg/eggSurface.h b/panda/src/egg/eggSurface.h index ca6994f7ba..19ee6cb907 100644 --- a/panda/src/egg/eggSurface.h +++ b/panda/src/egg/eggSurface.h @@ -21,7 +21,7 @@ /** * A parametric surface of some kind. See EggNurbsSurface. */ -class EXPCL_PANDAEGG EggSurface : public EggPrimitive { +class EXPCL_PANDA_EGG EggSurface : public EggPrimitive { PUBLISHED: INLINE explicit EggSurface(const std::string &name = ""); INLINE EggSurface(const EggSurface ©); diff --git a/panda/src/egg/eggSwitchCondition.h b/panda/src/egg/eggSwitchCondition.h index 35d1c16cc3..ceb15cca51 100644 --- a/panda/src/egg/eggSwitchCondition.h +++ b/panda/src/egg/eggSwitchCondition.h @@ -26,7 +26,7 @@ * different kinds of switching conditions; presently, only a type * is actually supported. */ -class EXPCL_PANDAEGG EggSwitchCondition : public EggObject { +class EXPCL_PANDA_EGG EggSwitchCondition : public EggObject { PUBLISHED: virtual EggSwitchCondition *make_copy() const=0; virtual void write(std::ostream &out, int indent_level) const=0; @@ -58,7 +58,7 @@ private: * A SwitchCondition that switches the levels-of-detail based on distance from * the camera's eyepoint. */ -class EXPCL_PANDAEGG EggSwitchConditionDistance : public EggSwitchCondition { +class EXPCL_PANDA_EGG EggSwitchConditionDistance : public EggSwitchCondition { PUBLISHED: explicit EggSwitchConditionDistance(double switch_in, double switch_out, const LPoint3d ¢er, double fade = 0.0); diff --git a/panda/src/egg/eggTable.h b/panda/src/egg/eggTable.h index a2f627f555..59d76e9a08 100644 --- a/panda/src/egg/eggTable.h +++ b/panda/src/egg/eggTable.h @@ -24,7 +24,7 @@ * EggSAnimData or an EggXfmAnimData, which do. It may also be a parent to * another or , establishing a hierarchy of tables. */ -class EXPCL_PANDAEGG EggTable : public EggGroupNode { +class EXPCL_PANDA_EGG EggTable : public EggGroupNode { PUBLISHED: enum TableType { TT_invalid, diff --git a/panda/src/egg/eggTexture.h b/panda/src/egg/eggTexture.h index e20c19b9cc..55f56f4b3d 100644 --- a/panda/src/egg/eggTexture.h +++ b/panda/src/egg/eggTexture.h @@ -27,7 +27,7 @@ /** * Defines a texture map that may be applied to geometry. */ -class EXPCL_PANDAEGG EggTexture : public EggFilenameNode, public EggRenderMode, public EggTransform { +class EXPCL_PANDA_EGG EggTexture : public EggFilenameNode, public EggRenderMode, public EggTransform { PUBLISHED: explicit EggTexture(const std::string &tref_name, const Filename &filename); EggTexture(const EggTexture ©); @@ -458,7 +458,7 @@ private: * Returns true if the two referenced EggTexture pointers are in sorted order, * false otherwise. */ -class EXPCL_PANDAEGG UniqueEggTextures { +class EXPCL_PANDA_EGG UniqueEggTextures { public: INLINE UniqueEggTextures(int eq = ~0); INLINE bool operator ()(const EggTexture *t1, const EggTexture *t2) const; @@ -470,18 +470,18 @@ INLINE std::ostream &operator << (std::ostream &out, const EggTexture &n) { return out << n.get_filename(); } -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::TextureType texture_type); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::Format format); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CompressionMode mode); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::WrapMode mode); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::FilterType type); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::EnvType type); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CombineMode cm); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CombineChannel cc); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CombineSource cs); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CombineOperand co); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::TexGen tex_gen); -EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::QualityLevel quality_level); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::TextureType texture_type); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::Format format); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::CompressionMode mode); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::WrapMode mode); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::FilterType type); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::EnvType type); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::CombineMode cm); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::CombineChannel cc); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::CombineSource cs); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::CombineOperand co); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::TexGen tex_gen); +EXPCL_PANDA_EGG std::ostream &operator << (std::ostream &out, EggTexture::QualityLevel quality_level); #include "eggTexture.I" diff --git a/panda/src/egg/eggTextureCollection.h b/panda/src/egg/eggTextureCollection.h index db9f64ae93..040a8e0da8 100644 --- a/panda/src/egg/eggTextureCollection.h +++ b/panda/src/egg/eggTextureCollection.h @@ -27,7 +27,7 @@ * from an egg file and sort them all together; it can also manage the * creation of unique textures and the assignment of unique TRef names. */ -class EXPCL_PANDAEGG EggTextureCollection { +class EXPCL_PANDA_EGG EggTextureCollection { // This is a bit of private interface stuff that must be here as a forward // reference. This allows us to define the EggTextureCollection as an STL diff --git a/panda/src/egg/eggTransform.h b/panda/src/egg/eggTransform.h index 9a6b95b434..671a3b1155 100644 --- a/panda/src/egg/eggTransform.h +++ b/panda/src/egg/eggTransform.h @@ -26,7 +26,7 @@ * This may be either a 3-d transform, and therefore described by a 4x4 * matrix, or a 2-d transform, described by a 3x3 matrix. */ -class EXPCL_PANDAEGG EggTransform { +class EXPCL_PANDA_EGG EggTransform { PUBLISHED: EggTransform(); EggTransform(const EggTransform ©); diff --git a/panda/src/egg/eggTriangleFan.h b/panda/src/egg/eggTriangleFan.h index d8a1c7807f..29485b2f5f 100644 --- a/panda/src/egg/eggTriangleFan.h +++ b/panda/src/egg/eggTriangleFan.h @@ -22,7 +22,7 @@ * A connected fan of triangles. This does not normally appear in an egg * file; it is typically generated as a result of meshing. */ -class EXPCL_PANDAEGG EggTriangleFan : public EggCompositePrimitive { +class EXPCL_PANDA_EGG EggTriangleFan : public EggCompositePrimitive { PUBLISHED: INLINE explicit EggTriangleFan(const std::string &name = ""); INLINE EggTriangleFan(const EggTriangleFan ©); diff --git a/panda/src/egg/eggTriangleStrip.h b/panda/src/egg/eggTriangleStrip.h index 728b6e2e30..052d174232 100644 --- a/panda/src/egg/eggTriangleStrip.h +++ b/panda/src/egg/eggTriangleStrip.h @@ -22,7 +22,7 @@ * A connected strip of triangles. This does not normally appear in an egg * file; it is typically generated as a result of meshing. */ -class EXPCL_PANDAEGG EggTriangleStrip : public EggCompositePrimitive { +class EXPCL_PANDA_EGG EggTriangleStrip : public EggCompositePrimitive { PUBLISHED: INLINE explicit EggTriangleStrip(const std::string &name = ""); INLINE EggTriangleStrip(const EggTriangleStrip ©); diff --git a/panda/src/egg/eggUserData.h b/panda/src/egg/eggUserData.h index cec2587946..477bebc7c6 100644 --- a/panda/src/egg/eggUserData.h +++ b/panda/src/egg/eggUserData.h @@ -26,7 +26,7 @@ * However, this data will not be written out to the disk when the egg file is * written; it is an in-memory object only. */ -class EXPCL_PANDAEGG EggUserData : public TypedReferenceCount { +class EXPCL_PANDA_EGG EggUserData : public TypedReferenceCount { PUBLISHED: INLINE EggUserData(); INLINE EggUserData(const EggUserData ©); diff --git a/panda/src/egg/eggVertex.h b/panda/src/egg/eggVertex.h index 4c2cc2e36d..55dbc8a3d3 100644 --- a/panda/src/egg/eggVertex.h +++ b/panda/src/egg/eggVertex.h @@ -36,7 +36,7 @@ class EggPrimitive; * Any one-, two-, three-, or four-component vertex, possibly with attributes * such as a normal. */ -class EXPCL_PANDAEGG EggVertex : public EggObject, public EggAttributes { +class EXPCL_PANDA_EGG EggVertex : public EggObject, public EggAttributes { public: typedef pset GroupRef; typedef pmultiset PrimitiveRef; @@ -211,7 +211,7 @@ INLINE std::ostream &operator << (std::ostream &out, const EggVertex &vert) { * Returns true if the two referenced EggVertex pointers are in sorted order, * false otherwise. */ -class EXPCL_PANDAEGG UniqueEggVertices { +class EXPCL_PANDA_EGG UniqueEggVertices { public: INLINE bool operator ()(const EggVertex *v1, const EggVertex *v2) const; }; diff --git a/panda/src/egg/eggVertexAux.h b/panda/src/egg/eggVertexAux.h index 20c80dd531..db8bb67ccc 100644 --- a/panda/src/egg/eggVertexAux.h +++ b/panda/src/egg/eggVertexAux.h @@ -27,7 +27,7 @@ * the vertex data, but will not otherwise interpret it. Presumably, a shader * will process the data later. */ -class EXPCL_PANDAEGG EggVertexAux : public EggNamedObject { +class EXPCL_PANDA_EGG EggVertexAux : public EggNamedObject { PUBLISHED: explicit EggVertexAux(const std::string &name, const LVecBase4d &aux); EggVertexAux(const EggVertexAux ©); diff --git a/panda/src/egg/eggVertexPool.h b/panda/src/egg/eggVertexPool.h index dd8672abb4..8ee26fa35b 100644 --- a/panda/src/egg/eggVertexPool.h +++ b/panda/src/egg/eggVertexPool.h @@ -38,7 +38,7 @@ * list. The list may also be operated on (read-only) via iterators and * begin()/end(). */ -class EXPCL_PANDAEGG EggVertexPool : public EggNode { +class EXPCL_PANDA_EGG EggVertexPool : public EggNode { // This is a bit of private interface stuff that must be here as a forward // reference. This allows us to define the EggVertexPool as an STL diff --git a/panda/src/egg/eggVertexUV.h b/panda/src/egg/eggVertexUV.h index 2483432aa9..2ab0447639 100644 --- a/panda/src/egg/eggVertexUV.h +++ b/panda/src/egg/eggVertexUV.h @@ -26,7 +26,7 @@ * multitexturing, there may be multiple sets of UV's on a particular vertex, * each with its own name. */ -class EXPCL_PANDAEGG EggVertexUV : public EggNamedObject { +class EXPCL_PANDA_EGG EggVertexUV : public EggNamedObject { PUBLISHED: explicit EggVertexUV(const std::string &name, const LTexCoordd &uv); explicit EggVertexUV(const std::string &name, const LTexCoord3d &uvw); diff --git a/panda/src/egg/eggXfmAnimData.h b/panda/src/egg/eggXfmAnimData.h index 412b586b73..1fdaec39fe 100644 --- a/panda/src/egg/eggXfmAnimData.h +++ b/panda/src/egg/eggXfmAnimData.h @@ -26,7 +26,7 @@ * is an older syntax of egg anim table, not often used currently--it's * replaced by EggXfmSAnim. */ -class EXPCL_PANDAEGG EggXfmAnimData : public EggAnimData { +class EXPCL_PANDA_EGG EggXfmAnimData : public EggAnimData { PUBLISHED: INLINE explicit EggXfmAnimData(const std::string &name = "", CoordinateSystem cs = CS_default); diff --git a/panda/src/egg/eggXfmSAnim.h b/panda/src/egg/eggXfmSAnim.h index 508f0cd67d..1fd37c51ad 100644 --- a/panda/src/egg/eggXfmSAnim.h +++ b/panda/src/egg/eggXfmSAnim.h @@ -25,7 +25,7 @@ class EggXfmAnimData; * It's implemented as a group that can contain any number of EggSAnimData * children. */ -class EXPCL_PANDAEGG EggXfmSAnim : public EggGroupNode { +class EXPCL_PANDA_EGG EggXfmSAnim : public EggGroupNode { PUBLISHED: INLINE explicit EggXfmSAnim(const std::string &name = "", CoordinateSystem cs = CS_default); diff --git a/panda/src/egg/parserDefs.h b/panda/src/egg/parserDefs.h index df91568015..b20cba96db 100644 --- a/panda/src/egg/parserDefs.h +++ b/panda/src/egg/parserDefs.h @@ -40,7 +40,7 @@ void egg_cleanup_parser(); // that has member functions in a union), so we'll use a class instead. That // means we need to declare it externally, here. -class EXPCL_PANDAEGG EggTokenType { +class EXPCL_PANDA_EGG EggTokenType { public: double _number; unsigned long _ulong; diff --git a/panda/src/egg/pt_EggMaterial.h b/panda/src/egg/pt_EggMaterial.h index 7c5e5f083e..6427434da9 100644 --- a/panda/src/egg/pt_EggMaterial.h +++ b/panda/src/egg/pt_EggMaterial.h @@ -24,9 +24,9 @@ * the template class. It's not strictly necessary, but it doesn't hurt. */ -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, PointerToBase) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, PointerTo) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, ConstPointerTo) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, PointerToBase) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, PointerTo) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, ConstPointerTo) typedef PointerTo PT_EggMaterial; typedef ConstPointerTo CPT_EggMaterial; diff --git a/panda/src/egg/pt_EggTexture.h b/panda/src/egg/pt_EggTexture.h index bc61025fb6..5138a7f25b 100644 --- a/panda/src/egg/pt_EggTexture.h +++ b/panda/src/egg/pt_EggTexture.h @@ -24,9 +24,9 @@ * template class. It's not strictly necessary, but it doesn't hurt. */ -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, PointerToBase) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, PointerTo) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, ConstPointerTo) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, PointerToBase) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, PointerTo) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, ConstPointerTo) typedef PointerTo PT_EggTexture; typedef ConstPointerTo CPT_EggTexture; diff --git a/panda/src/egg/pt_EggVertex.h b/panda/src/egg/pt_EggVertex.h index 5c2922b51d..8ff72c3a96 100644 --- a/panda/src/egg/pt_EggVertex.h +++ b/panda/src/egg/pt_EggVertex.h @@ -24,9 +24,9 @@ * template class. It's not strictly necessary, but it doesn't hurt. */ -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, PointerToBase) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, PointerTo) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, ConstPointerTo) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, PointerToBase) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, PointerTo) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG, ConstPointerTo) typedef PointerTo PT_EggVertex; typedef ConstPointerTo CPT_EggVertex; diff --git a/panda/src/egg/vector_PT_EggMaterial.h b/panda/src/egg/vector_PT_EggMaterial.h index 0878ba71c0..d1bb90ada9 100644 --- a/panda/src/egg/vector_PT_EggMaterial.h +++ b/panda/src/egg/vector_PT_EggMaterial.h @@ -28,8 +28,8 @@ * file, rather than defining the vector again. */ -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDA_EGG +#define EXPTP EXPTP_PANDA_EGG #define TYPE PT_EggMaterial #define NAME vector_PT_EggMaterial diff --git a/panda/src/egg/vector_PT_EggTexture.h b/panda/src/egg/vector_PT_EggTexture.h index 12d5f91212..062d24347c 100644 --- a/panda/src/egg/vector_PT_EggTexture.h +++ b/panda/src/egg/vector_PT_EggTexture.h @@ -28,8 +28,8 @@ * file, rather than defining the vector again. */ -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDA_EGG +#define EXPTP EXPTP_PANDA_EGG #define TYPE PT_EggTexture #define NAME vector_PT_EggTexture diff --git a/panda/src/egg/vector_PT_EggVertex.cxx b/panda/src/egg/vector_PT_EggVertex.cxx index 61deffdeac..e02586491c 100644 --- a/panda/src/egg/vector_PT_EggVertex.cxx +++ b/panda/src/egg/vector_PT_EggVertex.cxx @@ -13,8 +13,8 @@ #include "vector_PT_EggVertex.h" -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDA_EGG +#define EXPTP EXPTP_PANDA_EGG #define TYPE PT_EggVertex #define NAME vector_PT_EggVertex diff --git a/panda/src/egg/vector_PT_EggVertex.h b/panda/src/egg/vector_PT_EggVertex.h index 8d04bccc17..b8e8290179 100644 --- a/panda/src/egg/vector_PT_EggVertex.h +++ b/panda/src/egg/vector_PT_EggVertex.h @@ -28,8 +28,8 @@ * rather than defining the vector again. */ -#define EXPCL EXPCL_PANDAEGG -#define EXPTP EXPTP_PANDAEGG +#define EXPCL EXPCL_PANDA_EGG +#define EXPTP EXPTP_PANDA_EGG #define TYPE PT_EggVertex #define NAME vector_PT_EggVertex diff --git a/panda/src/egg2pg/animBundleMaker.h b/panda/src/egg2pg/animBundleMaker.h index 62a8e1f7bf..5f19d92f8d 100644 --- a/panda/src/egg2pg/animBundleMaker.h +++ b/panda/src/egg2pg/animBundleMaker.h @@ -32,7 +32,7 @@ class AnimChannelMatrixXfmTable; * Converts an EggTable hierarchy, beginning with a entry, into an * AnimBundle hierarchy. */ -class EXPCL_PANDAEGG AnimBundleMaker { +class EXPCL_PANDA_EGG2PG AnimBundleMaker { public: explicit AnimBundleMaker(EggTable *root); diff --git a/panda/src/egg2pg/characterMaker.h b/panda/src/egg2pg/characterMaker.h index 466f890f36..21163010a9 100644 --- a/panda/src/egg2pg/characterMaker.h +++ b/panda/src/egg2pg/characterMaker.h @@ -42,7 +42,7 @@ class PandaNode; * Converts an EggGroup hierarchy, beginning with a group with set, to * a character node with joints. */ -class EXPCL_PANDAEGG CharacterMaker { +class EXPCL_PANDA_EGG2PG CharacterMaker { public: CharacterMaker(EggGroup *root, EggLoader &loader, bool structured = false); diff --git a/panda/src/egg2pg/config_egg2pg.cxx b/panda/src/egg2pg/config_egg2pg.cxx index f864a8f4d8..36247ad2c4 100644 --- a/panda/src/egg2pg/config_egg2pg.cxx +++ b/panda/src/egg2pg/config_egg2pg.cxx @@ -20,8 +20,8 @@ #include "configVariableCore.h" #include "eggRenderState.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAEGG) - #error Buildsystem error: BUILDING_PANDAEGG not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_EGG2PG) + #error Buildsystem error: BUILDING_PANDA_EGG2PG not defined #endif ConfigureDef(config_egg2pg); diff --git a/panda/src/egg2pg/config_egg2pg.h b/panda/src/egg2pg/config_egg2pg.h index 874d413319..e9e0e202d6 100644 --- a/panda/src/egg2pg/config_egg2pg.h +++ b/panda/src/egg2pg/config_egg2pg.h @@ -25,36 +25,36 @@ #include "configVariableInt.h" #include "dconfig.h" -ConfigureDecl(config_egg2pg, EXPCL_PANDAEGG, EXPTP_PANDAEGG); -NotifyCategoryDecl(egg2pg, EXPCL_PANDAEGG, EXPTP_PANDAEGG); +ConfigureDecl(config_egg2pg, EXPCL_PANDA_EGG2PG, EXPTP_PANDA_EGG2PG); +NotifyCategoryDecl(egg2pg, EXPCL_PANDA_EGG2PG, EXPTP_PANDA_EGG2PG); -extern EXPCL_PANDAEGG ConfigVariableDouble egg_normal_scale; -extern EXPCL_PANDAEGG ConfigVariableBool egg_show_normals; -extern EXPCL_PANDAEGG ConfigVariableEnum egg_coordinate_system; -extern EXPCL_PANDAEGG ConfigVariableBool egg_ignore_mipmaps; -extern EXPCL_PANDAEGG ConfigVariableBool egg_ignore_filters; -extern EXPCL_PANDAEGG ConfigVariableBool egg_ignore_clamp; -extern EXPCL_PANDAEGG ConfigVariableBool egg_ignore_decals; -extern EXPCL_PANDAEGG ConfigVariableBool egg_flatten; -extern EXPCL_PANDAEGG ConfigVariableDouble egg_flatten_radius; -extern EXPCL_PANDAEGG ConfigVariableBool egg_unify; -extern EXPCL_PANDAEGG ConfigVariableBool egg_combine_geoms; -extern EXPCL_PANDAEGG ConfigVariableBool egg_rigid_geometry; -extern EXPCL_PANDAEGG ConfigVariableBool egg_flat_shading; -extern EXPCL_PANDAEGG ConfigVariableBool egg_flat_colors; -extern EXPCL_PANDAEGG ConfigVariableBool egg_load_old_curves; -extern EXPCL_PANDAEGG ConfigVariableBool egg_load_classic_nurbs_curves; -extern EXPCL_PANDAEGG ConfigVariableBool egg_accept_errors; -extern EXPCL_PANDAEGG ConfigVariableBool egg_suppress_hidden; -extern EXPCL_PANDAEGG ConfigVariableEnum egg_alpha_mode; -extern EXPCL_PANDAEGG ConfigVariableInt egg_max_vertices; -extern EXPCL_PANDAEGG ConfigVariableInt egg_max_indices; -extern EXPCL_PANDAEGG ConfigVariableBool egg_emulate_bface; -extern EXPCL_PANDAEGG ConfigVariableBool egg_preload_simple_textures; -extern EXPCL_PANDAEGG ConfigVariableDouble egg_vertex_membership_quantize; -extern EXPCL_PANDAEGG ConfigVariableInt egg_vertex_max_num_joints; -extern EXPCL_PANDAEGG ConfigVariableBool egg_implicit_alpha_binary; +extern EXPCL_PANDA_EGG2PG ConfigVariableDouble egg_normal_scale; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_show_normals; +extern EXPCL_PANDA_EGG2PG ConfigVariableEnum egg_coordinate_system; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_ignore_mipmaps; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_ignore_filters; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_ignore_clamp; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_ignore_decals; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_flatten; +extern EXPCL_PANDA_EGG2PG ConfigVariableDouble egg_flatten_radius; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_unify; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_combine_geoms; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_rigid_geometry; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_flat_shading; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_flat_colors; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_load_old_curves; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_load_classic_nurbs_curves; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_accept_errors; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_suppress_hidden; +extern EXPCL_PANDA_EGG2PG ConfigVariableEnum egg_alpha_mode; +extern EXPCL_PANDA_EGG2PG ConfigVariableInt egg_max_vertices; +extern EXPCL_PANDA_EGG2PG ConfigVariableInt egg_max_indices; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_emulate_bface; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_preload_simple_textures; +extern EXPCL_PANDA_EGG2PG ConfigVariableDouble egg_vertex_membership_quantize; +extern EXPCL_PANDA_EGG2PG ConfigVariableInt egg_vertex_max_num_joints; +extern EXPCL_PANDA_EGG2PG ConfigVariableBool egg_implicit_alpha_binary; -extern EXPCL_PANDAEGG void init_libegg2pg(); +extern EXPCL_PANDA_EGG2PG void init_libegg2pg(); #endif diff --git a/panda/src/egg2pg/egg_parametrics.h b/panda/src/egg2pg/egg_parametrics.h index 639561dc0e..a18ab4db61 100644 --- a/panda/src/egg2pg/egg_parametrics.h +++ b/panda/src/egg2pg/egg_parametrics.h @@ -29,7 +29,7 @@ BEGIN_PUBLISH * the object is invalid. If there is vertex color, it will be applied to * values 0 - 3 of the extended vertex values. */ -EXPCL_PANDAEGG PT(NurbsSurfaceEvaluator) +EXPCL_PANDA_EGG2PG PT(NurbsSurfaceEvaluator) make_nurbs_surface(EggNurbsSurface *egg_surface, const LMatrix4d &mat); /** @@ -38,7 +38,7 @@ make_nurbs_surface(EggNurbsSurface *egg_surface, const LMatrix4d &mat); * object is invalid. If there is vertex color, it will be applied to values * 0 - 3 of the extended vertex values. */ -EXPCL_PANDAEGG PT(NurbsCurveEvaluator) +EXPCL_PANDA_EGG2PG PT(NurbsCurveEvaluator) make_nurbs_curve(EggNurbsCurve *egg_curve, const LMatrix4d &mat); END_PUBLISH diff --git a/panda/src/egg2pg/load_egg_file.h b/panda/src/egg2pg/load_egg_file.h index 45ea636f94..9bfafbbcc5 100644 --- a/panda/src/egg2pg/load_egg_file.h +++ b/panda/src/egg2pg/load_egg_file.h @@ -31,7 +31,7 @@ BEGIN_PUBLISH * Also see the EggLoader class, which can exercise a bit more manual control * over the loading process. */ -EXPCL_PANDAEGG PT(PandaNode) +EXPCL_PANDA_EGG2PG PT(PandaNode) load_egg_file(const Filename &filename, CoordinateSystem cs = CS_default, BamCacheRecord *record = nullptr); @@ -40,7 +40,7 @@ load_egg_file(const Filename &filename, CoordinateSystem cs = CS_default, * already-filled EggData structure. The structure is destroyed in the * loading. */ -EXPCL_PANDAEGG PT(PandaNode) +EXPCL_PANDA_EGG2PG PT(PandaNode) load_egg_data(EggData *data, CoordinateSystem cs = CS_default); END_PUBLISH diff --git a/panda/src/egg2pg/loaderFileTypeEgg.h b/panda/src/egg2pg/loaderFileTypeEgg.h index a0ca9474ed..a719fc0323 100644 --- a/panda/src/egg2pg/loaderFileTypeEgg.h +++ b/panda/src/egg2pg/loaderFileTypeEgg.h @@ -21,7 +21,7 @@ /** * This defines the Loader interface to read Egg files. */ -class EXPCL_PANDAEGG LoaderFileTypeEgg : public LoaderFileType { +class EXPCL_PANDA_EGG2PG LoaderFileTypeEgg : public LoaderFileType { public: LoaderFileTypeEgg(); diff --git a/panda/src/egg2pg/save_egg_file.h b/panda/src/egg2pg/save_egg_file.h index 0c522cffa0..0804cfc01a 100644 --- a/panda/src/egg2pg/save_egg_file.h +++ b/panda/src/egg2pg/save_egg_file.h @@ -25,7 +25,7 @@ BEGIN_PUBLISH * A convenience function; converts the indicated scene graph to an egg file * and writes it to disk. */ -EXPCL_PANDAEGG bool +EXPCL_PANDA_EGG2PG bool save_egg_file(const Filename &filename, PandaNode *node, CoordinateSystem cs = CS_default); @@ -33,7 +33,7 @@ save_egg_file(const Filename &filename, PandaNode *node, * Another convenience function; works like save_egg_file() but populates an * EggData instead of writing the results to disk. */ -EXPCL_PANDAEGG bool +EXPCL_PANDA_EGG2PG bool save_egg_data(EggData *data, PandaNode *node); END_PUBLISH diff --git a/panda/src/pandabase/pandasymbols.h b/panda/src/pandabase/pandasymbols.h index d0f7fd19f0..5d5d78ef75 100644 --- a/panda/src/pandabase/pandasymbols.h +++ b/panda/src/pandabase/pandasymbols.h @@ -105,6 +105,12 @@ #define BUILDING_PANDA_TFORM #endif +/* BUILDING_PANDAEGG for these: */ +#ifdef BUILDING_PANDAEGG + #define BUILDING_PANDA_EGG + #define BUILDING_PANDA_EGG2PG +#endif + /* BUILDING_PANDAEXPRESS for these: */ #ifdef BUILDING_PANDAEXPRESS #define BUILDING_PANDA_DOWNLOADER @@ -205,6 +211,22 @@ #define EXPTP_PANDA_DXML IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_EGG + #define EXPCL_PANDA_EGG EXPORT_CLASS + #define EXPTP_PANDA_EGG EXPORT_TEMPL +#else + #define EXPCL_PANDA_EGG IMPORT_CLASS + #define EXPTP_PANDA_EGG IMPORT_TEMPL +#endif + +#ifdef BUILDING_PANDA_EGG2PG + #define EXPCL_PANDA_EGG2PG EXPORT_CLASS + #define EXPTP_PANDA_EGG2PG EXPORT_TEMPL +#else + #define EXPCL_PANDA_EGG2PG IMPORT_CLASS + #define EXPTP_PANDA_EGG2PG IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_EVENT #define EXPCL_PANDA_EVENT EXPORT_CLASS #define EXPTP_PANDA_EVENT EXPORT_TEMPL From a971bc1dfcf5e07f74be4b28c19ee276c39056d8 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 10 Jun 2018 20:27:23 -0600 Subject: [PATCH 13/14] general: Break apart BUILDING_PANDAGL --- panda/src/cocoadisplay/config_cocoadisplay.h | 4 +- panda/src/cocoadisplay/config_cocoadisplay.mm | 4 +- panda/src/framework/pandaFramework.cxx | 2 +- panda/src/glgsg/config_glgsg.cxx | 4 +- panda/src/glgsg/config_glgsg.h | 6 +- panda/src/glgsg/glgsg.h | 4 +- panda/src/glstuff/glmisc_src.h | 6 +- panda/src/glxdisplay/config_glxdisplay.cxx | 4 +- panda/src/glxdisplay/config_glxdisplay.h | 4 +- panda/src/osxdisplay/config_osxdisplay.cxx | 4 +- panda/src/osxdisplay/config_osxdisplay.h | 4 +- panda/src/osxdisplay/osxGraphicsPipe.h | 2 +- panda/src/pandabase/pandasymbols.h | 65 ++++++++++++++++--- panda/src/wgldisplay/config_wgldisplay.cxx | 4 +- panda/src/wgldisplay/config_wgldisplay.h | 4 +- panda/src/wgldisplay/wglGraphicsBuffer.h | 2 +- panda/src/wgldisplay/wglGraphicsPipe.h | 2 +- panda/src/wgldisplay/wglGraphicsWindow.h | 2 +- 18 files changed, 88 insertions(+), 39 deletions(-) diff --git a/panda/src/cocoadisplay/config_cocoadisplay.h b/panda/src/cocoadisplay/config_cocoadisplay.h index a5ed970b8f..43a0e057c3 100644 --- a/panda/src/cocoadisplay/config_cocoadisplay.h +++ b/panda/src/cocoadisplay/config_cocoadisplay.h @@ -18,8 +18,8 @@ #include "notifyCategoryProxy.h" #include "configVariableBool.h" -NotifyCategoryDecl(cocoadisplay, EXPCL_PANDAGL, EXPTP_PANDAGL); +NotifyCategoryDecl(cocoadisplay, EXPCL_PANDA_COCOADISPLAY, EXPTP_PANDA_COCOADISPLAY); -extern EXPCL_PANDAGL void init_libcocoadisplay(); +extern EXPCL_PANDA_COCOADISPLAY void init_libcocoadisplay(); #endif diff --git a/panda/src/cocoadisplay/config_cocoadisplay.mm b/panda/src/cocoadisplay/config_cocoadisplay.mm index c88177cf66..a41e5bc579 100644 --- a/panda/src/cocoadisplay/config_cocoadisplay.mm +++ b/panda/src/cocoadisplay/config_cocoadisplay.mm @@ -20,8 +20,8 @@ #include "dconfig.h" #include "pandaSystem.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_COCOADISPLAY) + #error Buildsystem error: BUILDING_PANDA_COCOADISPLAY not defined #endif Configure(config_cocoadisplay); diff --git a/panda/src/framework/pandaFramework.cxx b/panda/src/framework/pandaFramework.cxx index 26f5f2d3ce..9179aa02f4 100644 --- a/panda/src/framework/pandaFramework.cxx +++ b/panda/src/framework/pandaFramework.cxx @@ -91,7 +91,7 @@ open_framework(int &argc, char **&argv) { // If we're statically linking, we need to explicitly link with at least one // of the available renderers. #if defined(HAVE_GL) - extern EXPCL_PANDAGL void init_libpandagl(); + extern void init_libpandagl(); init_libpandagl(); #elif defined(HAVE_DX9) extern EXPCL_PANDADX void init_libpandadx9(); diff --git a/panda/src/glgsg/config_glgsg.cxx b/panda/src/glgsg/config_glgsg.cxx index 6e60169acc..1c7ddcbfd5 100644 --- a/panda/src/glgsg/config_glgsg.cxx +++ b/panda/src/glgsg/config_glgsg.cxx @@ -16,8 +16,8 @@ #include "dconfig.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_GLGSG) + #error Buildsystem error: BUILDING_PANDA_GLGSG not defined #endif ConfigureDef(config_glgsg); diff --git a/panda/src/glgsg/config_glgsg.h b/panda/src/glgsg/config_glgsg.h index 87220333ed..e2beef8e52 100644 --- a/panda/src/glgsg/config_glgsg.h +++ b/panda/src/glgsg/config_glgsg.h @@ -18,9 +18,9 @@ #include "notifyCategoryProxy.h" #include "dconfig.h" -ConfigureDecl(config_glgsg, EXPCL_PANDAGL, EXPTP_PANDAGL); -NotifyCategoryDecl(glgsg, EXPCL_PANDAGL, EXPTP_PANDAGL); +ConfigureDecl(config_glgsg, EXPCL_PANDA_GLGSG, EXPTP_PANDA_GLGSG); +NotifyCategoryDecl(glgsg, EXPCL_PANDA_GLGSG, EXPTP_PANDA_GLGSG); -extern EXPCL_PANDAGL void init_libglgsg(); +extern EXPCL_PANDA_GLGSG void init_libglgsg(); #endif diff --git a/panda/src/glgsg/glgsg.h b/panda/src/glgsg/glgsg.h index 713ce9e862..b225466ab0 100644 --- a/panda/src/glgsg/glgsg.h +++ b/panda/src/glgsg/glgsg.h @@ -37,8 +37,8 @@ #define GLSYSTEM_NAME "OpenGL" #define CONFIGOBJ config_glgsg #define GLCAT glgsg_cat -#define EXPCL_GL EXPCL_PANDAGL -#define EXPTP_GL EXPTP_PANDAGL +#define EXPCL_GL EXPCL_PANDA_GLGSG +#define EXPTP_GL EXPTP_PANDA_GLGSG #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 2) #define EXPECT_GL_VERSION_1_2 diff --git a/panda/src/glstuff/glmisc_src.h b/panda/src/glstuff/glmisc_src.h index 5ba0b35d20..3c6dd81e7b 100644 --- a/panda/src/glstuff/glmisc_src.h +++ b/panda/src/glstuff/glmisc_src.h @@ -40,8 +40,8 @@ // #define GSG_VERBOSE 1 -extern ConfigVariableInt gl_version; -extern EXPCL_PANDAGL ConfigVariableBool gl_support_fbo; +extern EXPCL_GL ConfigVariableInt gl_version; +extern EXPCL_GL ConfigVariableBool gl_support_fbo; extern ConfigVariableBool gl_cheap_textures; extern ConfigVariableBool gl_ignore_clamp; extern ConfigVariableBool gl_support_clamp_to_border; @@ -58,7 +58,7 @@ extern ConfigVariableBool gl_interleaved_arrays; extern ConfigVariableBool gl_parallel_arrays; extern ConfigVariableInt gl_max_errors; extern ConfigVariableEnum gl_min_buffer_usage_hint; -extern ConfigVariableBool gl_debug; +extern EXPCL_GL ConfigVariableBool gl_debug; extern ConfigVariableBool gl_debug_synchronous; extern ConfigVariableEnum gl_debug_abort_level; extern ConfigVariableBool gl_debug_object_labels; diff --git a/panda/src/glxdisplay/config_glxdisplay.cxx b/panda/src/glxdisplay/config_glxdisplay.cxx index fffcd2c264..23b8aef8fa 100644 --- a/panda/src/glxdisplay/config_glxdisplay.cxx +++ b/panda/src/glxdisplay/config_glxdisplay.cxx @@ -23,8 +23,8 @@ #include "dconfig.h" #include "pandaSystem.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_GLXDISPLAY) + #error Buildsystem error: BUILDING_PANDA_GLXDISPLAY not defined #endif Configure(config_glxdisplay); diff --git a/panda/src/glxdisplay/config_glxdisplay.h b/panda/src/glxdisplay/config_glxdisplay.h index 7c8aadc3b9..9cabb2de39 100644 --- a/panda/src/glxdisplay/config_glxdisplay.h +++ b/panda/src/glxdisplay/config_glxdisplay.h @@ -20,9 +20,9 @@ #include "configVariableBool.h" #include "configVariableInt.h" -NotifyCategoryDecl(glxdisplay, EXPCL_PANDAGL, EXPTP_PANDAGL); +NotifyCategoryDecl(glxdisplay, EXPCL_PANDA_GLXDISPLAY, EXPTP_PANDA_GLXDISPLAY); -extern EXPCL_PANDAGL void init_libglxdisplay(); +extern EXPCL_PANDA_GLXDISPLAY void init_libglxdisplay(); extern ConfigVariableBool glx_get_proc_address; extern ConfigVariableBool glx_get_os_address; diff --git a/panda/src/osxdisplay/config_osxdisplay.cxx b/panda/src/osxdisplay/config_osxdisplay.cxx index 4ac68f5e58..43f897b862 100644 --- a/panda/src/osxdisplay/config_osxdisplay.cxx +++ b/panda/src/osxdisplay/config_osxdisplay.cxx @@ -20,8 +20,8 @@ #include "pandaSystem.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_OSXDISPLAY) + #error Buildsystem error: BUILDING_PANDA_OSXDISPLAY not defined #endif Configure(config_osxdisplay); diff --git a/panda/src/osxdisplay/config_osxdisplay.h b/panda/src/osxdisplay/config_osxdisplay.h index cedaff1e3e..5eadc80a7e 100644 --- a/panda/src/osxdisplay/config_osxdisplay.h +++ b/panda/src/osxdisplay/config_osxdisplay.h @@ -17,9 +17,9 @@ #include "configVariableBool.h" #include "configVariableInt.h" -NotifyCategoryDecl( osxdisplay , EXPCL_PANDAGL, EXPTP_PANDAGL); +NotifyCategoryDecl( osxdisplay , EXPCL_PANDA_OSXDISPLAY, EXPTP_PANDA_OSXDISPLAY); -extern EXPCL_PANDAGL void init_libosxdisplay(); +extern EXPCL_PANDA_OSXDISPLAY void init_libosxdisplay(); extern ConfigVariableBool show_resize_box; extern ConfigVariableBool osx_support_gl_buffer; diff --git a/panda/src/osxdisplay/osxGraphicsPipe.h b/panda/src/osxdisplay/osxGraphicsPipe.h index 02cc60576c..75094778d6 100644 --- a/panda/src/osxdisplay/osxGraphicsPipe.h +++ b/panda/src/osxdisplay/osxGraphicsPipe.h @@ -24,7 +24,7 @@ class PNMImage; * This graphics pipe represents the interface for creating OpenGL graphics * windows on the various OSX's. */ -class EXPCL_PANDAGL osxGraphicsPipe : public GraphicsPipe { +class EXPCL_PANDA_OSXDISPLAY osxGraphicsPipe : public GraphicsPipe { public: osxGraphicsPipe(); virtual ~osxGraphicsPipe(); diff --git a/panda/src/pandabase/pandasymbols.h b/panda/src/pandabase/pandasymbols.h index 5d5d78ef75..ef83b4314e 100644 --- a/panda/src/pandabase/pandasymbols.h +++ b/panda/src/pandabase/pandasymbols.h @@ -117,6 +117,15 @@ #define BUILDING_PANDA_EXPRESS #endif +/* BUILDING_PANDAGL for these: */ +#ifdef BUILDING_PANDAGL + #define BUILDING_PANDA_COCOADISPLAY + #define BUILDING_PANDA_GLGSG + #define BUILDING_PANDA_GLXDISPLAY + #define BUILDING_PANDA_OSXDISPLAY + #define BUILDING_PANDA_WGLDISPLAY +#endif + /* BUILDING_PANDAPHYSICS for these: */ #ifdef BUILDING_PANDAPHYSICS #define BUILDING_PANDA_PARTICLESYSTEM @@ -155,6 +164,14 @@ #define EXPTP_PANDA_CHAR IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_COCOADISPLAY + #define EXPCL_PANDA_COCOADISPLAY EXPORT_CLASS + #define EXPTP_PANDA_COCOADISPLAY EXPORT_TEMPL +#else + #define EXPCL_PANDA_COCOADISPLAY IMPORT_CLASS + #define EXPTP_PANDA_COCOADISPLAY IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_COLLIDE #define EXPCL_PANDA_COLLIDE EXPORT_CLASS #define EXPTP_PANDA_COLLIDE EXPORT_TEMPL @@ -243,6 +260,22 @@ #define EXPTP_PANDA_EXPRESS IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_GLGSG + #define EXPCL_PANDA_GLGSG EXPORT_CLASS + #define EXPTP_PANDA_GLGSG EXPORT_TEMPL +#else + #define EXPCL_PANDA_GLGSG IMPORT_CLASS + #define EXPTP_PANDA_GLGSG IMPORT_TEMPL +#endif + +#ifdef BUILDING_PANDA_GLXDISPLAY + #define EXPCL_PANDA_GLXDISPLAY EXPORT_CLASS + #define EXPTP_PANDA_GLXDISPLAY EXPORT_TEMPL +#else + #define EXPCL_PANDA_GLXDISPLAY IMPORT_CLASS + #define EXPTP_PANDA_GLXDISPLAY IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_GOBJ #define EXPCL_PANDA_GOBJ EXPORT_CLASS #define EXPTP_PANDA_GOBJ EXPORT_TEMPL @@ -307,6 +340,14 @@ #define EXPTP_PANDA_NET IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_OSXDISPLAY + #define EXPCL_PANDA_OSXDISPLAY EXPORT_CLASS + #define EXPTP_PANDA_OSXDISPLAY EXPORT_TEMPL +#else + #define EXPCL_PANDA_OSXDISPLAY IMPORT_CLASS + #define EXPTP_PANDA_OSXDISPLAY IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDA_PARAMETRICS #define EXPCL_PANDA_PARAMETRICS EXPORT_CLASS #define EXPTP_PANDA_PARAMETRICS EXPORT_TEMPL @@ -427,6 +468,14 @@ #define EXPTP_PANDA_TFORM IMPORT_TEMPL #endif +#ifdef BUILDING_PANDA_WGLDISPLAY + #define EXPCL_PANDA_WGLDISPLAY EXPORT_CLASS + #define EXPTP_PANDA_WGLDISPLAY EXPORT_TEMPL +#else + #define EXPCL_PANDA_WGLDISPLAY IMPORT_CLASS + #define EXPTP_PANDA_WGLDISPLAY IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDAAWESOMIUM #define EXPCL_PANDAAWESOMIUM EXPORT_CLASS #define EXPTP_PANDAAWESOMIUM EXPORT_TEMPL @@ -435,6 +484,14 @@ #define EXPTP_PANDAAWESOMIUM IMPORT_TEMPL #endif +#ifdef BUILDING_PANDAGL + #define EXPCL_PANDAGL EXPORT_CLASS + #define EXPTP_PANDAGL EXPORT_TEMPL +#else + #define EXPCL_PANDAGL IMPORT_CLASS + #define EXPTP_PANDAGL IMPORT_TEMPL +#endif + #ifdef BUILDING_PANDABULLET #define EXPCL_PANDABULLET EXPORT_CLASS #define EXPTP_PANDABULLET EXPORT_TEMPL @@ -467,14 +524,6 @@ #define EXPTP_PANDAFX IMPORT_TEMPL #endif -#ifdef BUILDING_PANDAGL - #define EXPCL_PANDAGL EXPORT_CLASS - #define EXPTP_PANDAGL EXPORT_TEMPL -#else - #define EXPCL_PANDAGL IMPORT_CLASS - #define EXPTP_PANDAGL IMPORT_TEMPL -#endif - #ifdef BUILDING_PANDAGLES #define EXPCL_PANDAGLES EXPORT_CLASS #define EXPTP_PANDAGLES EXPORT_TEMPL diff --git a/panda/src/wgldisplay/config_wgldisplay.cxx b/panda/src/wgldisplay/config_wgldisplay.cxx index 93dc2ad36c..fa04606dca 100644 --- a/panda/src/wgldisplay/config_wgldisplay.cxx +++ b/panda/src/wgldisplay/config_wgldisplay.cxx @@ -20,8 +20,8 @@ #include "dconfig.h" #include "pandaSystem.h" -#if !defined(CPPPARSER) && !defined(BUILDING_PANDAGL) - #error Buildsystem error: BUILDING_PANDAGL not defined +#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_WGLDISPLAY) + #error Buildsystem error: BUILDING_PANDA_WGLDISPLAY not defined #endif Configure(config_wgldisplay); diff --git a/panda/src/wgldisplay/config_wgldisplay.h b/panda/src/wgldisplay/config_wgldisplay.h index 400b565bbd..e4c2096b5e 100644 --- a/panda/src/wgldisplay/config_wgldisplay.h +++ b/panda/src/wgldisplay/config_wgldisplay.h @@ -19,12 +19,12 @@ #include "configVariableInt.h" #include "configVariableBool.h" -NotifyCategoryDecl(wgldisplay, EXPCL_PANDAGL, EXPTP_PANDAGL); +NotifyCategoryDecl(wgldisplay, EXPCL_PANDA_WGLDISPLAY, EXPTP_PANDA_WGLDISPLAY); extern ConfigVariableInt gl_force_pixfmt; extern ConfigVariableBool gl_force_invalid; extern ConfigVariableBool gl_do_vidmemsize_check; -extern EXPCL_PANDAGL void init_libwgldisplay(); +extern EXPCL_PANDA_WGLDISPLAY void init_libwgldisplay(); #endif diff --git a/panda/src/wgldisplay/wglGraphicsBuffer.h b/panda/src/wgldisplay/wglGraphicsBuffer.h index 594adc921d..3560d3f4b5 100644 --- a/panda/src/wgldisplay/wglGraphicsBuffer.h +++ b/panda/src/wgldisplay/wglGraphicsBuffer.h @@ -32,7 +32,7 @@ * we can use, and thus makes it difficult to support one GSG rendering into * an offscreen buffer and also into a window. */ -class EXPCL_PANDAGL wglGraphicsBuffer : public GraphicsBuffer { +class EXPCL_PANDA_WGLDISPLAY wglGraphicsBuffer : public GraphicsBuffer { public: wglGraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, const std::string &name, diff --git a/panda/src/wgldisplay/wglGraphicsPipe.h b/panda/src/wgldisplay/wglGraphicsPipe.h index 892a8f8884..176483f92c 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.h +++ b/panda/src/wgldisplay/wglGraphicsPipe.h @@ -23,7 +23,7 @@ class wglGraphicsStateGuardian; * This graphics pipe represents the interface for creating OpenGL graphics * windows on the various Windows OSes. */ -class EXPCL_PANDAGL wglGraphicsPipe : public WinGraphicsPipe { +class EXPCL_PANDA_WGLDISPLAY wglGraphicsPipe : public WinGraphicsPipe { public: wglGraphicsPipe(); virtual ~wglGraphicsPipe(); diff --git a/panda/src/wgldisplay/wglGraphicsWindow.h b/panda/src/wgldisplay/wglGraphicsWindow.h index 0db8f9cc73..06a74aa501 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.h +++ b/panda/src/wgldisplay/wglGraphicsWindow.h @@ -20,7 +20,7 @@ /** * A single graphics window for rendering OpenGL under Microsoft Windows. */ -class EXPCL_PANDAGL wglGraphicsWindow : public WinGraphicsWindow { +class EXPCL_PANDA_WGLDISPLAY wglGraphicsWindow : public WinGraphicsWindow { public: wglGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, const std::string &name, From 69d5fcf3b0af0f81aab1533c3685d78a73d5b481 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Tue, 12 Jun 2018 16:13:52 -0600 Subject: [PATCH 14/14] pgraph: Fix use of incomplete GeomNode in PT(GeomNode) --- panda/src/pgraph/cullBin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/pgraph/cullBin.h b/panda/src/pgraph/cullBin.h index 7a104d1f3b..05e0fbb19e 100644 --- a/panda/src/pgraph/cullBin.h +++ b/panda/src/pgraph/cullBin.h @@ -20,6 +20,7 @@ #include "pStatCollector.h" #include "pointerTo.h" #include "luse.h" +#include "geomNode.h" class CullableObject; class GraphicsStateGuardianBase; @@ -27,7 +28,6 @@ class SceneSetup; class TransformState; class RenderState; class PandaNode; -class GeomNode; /** * A collection of Geoms and their associated state, for a particular scene.