[Python-ogre-commit] SF.net SVN: python-ogre:[786] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-11-03 07:40:12
|
Revision: 786 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=786&view=rev Author: andy_miller Date: 2008-11-03 07:40:08 +0000 (Mon, 03 Nov 2008) Log Message: ----------- Updated to latest ET SceneManager - Changed to BetaGui to latest version Modified Paths: -------------- trunk/python-ogre/SConstruct trunk/python-ogre/ThirdParty/et/ETBrush.cpp trunk/python-ogre/ThirdParty/et/ETLightmap.cpp trunk/python-ogre/ThirdParty/et/ETLoadSaveHeightmap.cpp trunk/python-ogre/ThirdParty/et/ETPrerequisites.h trunk/python-ogre/ThirdParty/et/ETSplattingManager.cpp trunk/python-ogre/ThirdParty/et/ETTerrainInfo.cpp trunk/python-ogre/ThirdParty/et/ETTerrainInfo.h trunk/python-ogre/ThirdParty/et/ETTerrainManager.cpp trunk/python-ogre/ThirdParty/et/ETTerrainManager.h trunk/python-ogre/ThirdParty/et/ETTile.cpp trunk/python-ogre/ThirdParty/et/Impl/ETOptions.h trunk/python-ogre/ThirdParty/et/Impl/ETTerrainImpl.h trunk/python-ogre/ThirdParty/et/Impl/ETTile.h trunk/python-ogre/code_generators/betagui/customization_data.py trunk/python-ogre/code_generators/betagui/generate_code.py trunk/python-ogre/code_generators/betagui/python_betagui.h trunk/python-ogre/demos/ogre/Demo_Bezier.py trunk/python-ogre/demos/ogre/Demo_Smoke.py trunk/python-ogre/demos/plugins.cfg trunk/python-ogre/environment.py Modified: trunk/python-ogre/SConstruct =================================================================== --- trunk/python-ogre/SConstruct 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/SConstruct 2008-11-03 07:40:08 UTC (rev 786) @@ -146,8 +146,13 @@ cls._source = cls.generated_dir cls._build_dir = os.path.join ( builddir, cls.dir_name) cls._name = name - _env = Environment(ENV=os.environ) + ## Note the change -- bug in scons means you have to set env seperately + _env = Environment(ENV = os.environ) + + print os.environ['PATH'] + print _env['ENV'] + if environment.rpath: _env.Append(RPATH=environment.rpath) @@ -209,7 +214,7 @@ if environment.isWindows(): ## and lets have it install the output into the 'package_dir_name/ModuleName' dir and rename to the PydName _env.AddPostAction(package,\ - 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) + Action ('mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) ) if environment.isLinux() and "-g" not in _env["CCFLAGS"]: _env.AddPostAction(package,\ '-strip -g -S -d --strip-debug -s %(name)s' % { 'name':package[index] } ) Modified: trunk/python-ogre/ThirdParty/et/ETBrush.cpp =================================================================== --- trunk/python-ogre/ThirdParty/et/ETBrush.cpp 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETBrush.cpp 2008-11-03 07:40:08 UTC (rev 786) @@ -120,7 +120,11 @@ void saveBrushToImage(const Brush& brush, Image& image) { // save brush as a 16bit grayscale image - ushort* data = new ushort[brush.getWidth()*brush.getHeight()]; +#if OGRE_VERSION_MINOR > 4 + ushort* data = (ushort*)OGRE_ALLOC_T(uchar, brush.getWidth()*brush.getHeight()*sizeof(ushort), MEMCATEGORY_GENERAL); +#else + ushort* data = (ushort*)new uchar[brush.getWidth()*brush.getHeight()*sizeof(ushort)]; +#endif for (size_t x = 0; x < brush.getWidth(); ++x) for (size_t y = 0; y < brush.getHeight(); ++y) data[y*brush.getWidth() + x] = ushort(brush.at(x, y) * 0xffff); Modified: trunk/python-ogre/ThirdParty/et/ETLightmap.cpp =================================================================== --- trunk/python-ogre/ThirdParty/et/ETLightmap.cpp 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETLightmap.cpp 2008-11-03 07:40:08 UTC (rev 786) @@ -285,7 +285,13 @@ step.z /= height; Vector3 pos = startPos; +#if OGRE_VERSION_MINOR > 4 + // Ogre::Image uses the memory allocation macros internally in Shoggoth, + // so we must use them as well. + uchar* lightMap = OGRE_ALLOC_T(uchar, width*height*3, MEMCATEGORY_GENERAL); +#else uchar* lightMap = new uchar[width*height * 3]; +#endif memset(lightMap, 255, width*height*3); for (size_t z = 0; z < height; ++z) @@ -322,6 +328,6 @@ // save lightmap to image image.loadDynamicImage(lightMap, width, height, 1, PF_BYTE_RGB, true); - // ownership of lightMap was transfered to image, don't need to delete + // ownership of lightMap was transfered to image, don't need to delete } } Modified: trunk/python-ogre/ThirdParty/et/ETLoadSaveHeightmap.cpp =================================================================== --- trunk/python-ogre/ThirdParty/et/ETLoadSaveHeightmap.cpp 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETLoadSaveHeightmap.cpp 2008-11-03 07:40:08 UTC (rev 786) @@ -105,7 +105,11 @@ uint maxVal = (1 << (bpp*8)) - 1; +#if OGRE_VERSION_MINOR > 4 + uchar* data = OGRE_ALLOC_T(uchar, info.getWidth()*info.getHeight()*bpp, MEMCATEGORY_GENERAL); +#else uchar* data = new uchar[info.getWidth()*info.getHeight()*bpp]; +#endif uchar* pos = data; // fill data array Modified: trunk/python-ogre/ThirdParty/et/ETPrerequisites.h =================================================================== --- trunk/python-ogre/ThirdParty/et/ETPrerequisites.h 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETPrerequisites.h 2008-11-03 07:40:08 UTC (rev 786) @@ -3,26 +3,20 @@ #include <OgrePlatform.h> -#define _ETManagerExport +// #if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32 ) +// # ifdef ET_MANAGER_EXPORTS +// # define _ETManagerExport __declspec(dllexport) +// # else +// # if defined( __MINGW32__ ) +# define _ETManagerExport +// # else +// # define _ETManagerExport __declspec(dllimport) +// # endif +// # endif +// #elif defined ( OGRE_GCC_VISIBILITY ) +// # define _ETManagerExport __attribute__ ((visibility("default"))) +// #else +// # define _ETManagerExport +// #endif -// // #ifndef _ETManagerExport - -// // #if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32 ) -// // # ifdef ET_MANAGER_EXPORTS -// // # define _ETManagerExport __declspec(dllexport) -// // # else -// // # if defined( __MINGW32__ ) -// // # define _ETManagerExport -// // # else -// // # define _ETManagerExport __declspec(dllimport) -// // # endif -// // # endif -// // #elif defined ( OGRE_GCC_VISIBILITY ) -// // # define _ETManagerExport __attribute__ ((visibility("default"))) -// // #else -// // # define _ETManagerExport -// // #endif - -// // #endif - #endif Modified: trunk/python-ogre/ThirdParty/et/ETSplattingManager.cpp =================================================================== --- trunk/python-ogre/ThirdParty/et/ETSplattingManager.cpp 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETSplattingManager.cpp 2008-11-03 07:40:08 UTC (rev 786) @@ -422,7 +422,11 @@ if (colours.size() > mImpl->numTextures) OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Given more colours than texture channels available.", __FUNCTION__); +#if OGRE_VERSION_MINOR > 4 + uchar* data = OGRE_ALLOC_T(uchar, mImpl->width*mImpl->height*3, MEMCATEGORY_GENERAL); +#else uchar* data = new uchar[mImpl->width*mImpl->height*3]; +#endif for (size_t y = 0; y < mImpl->height; ++y) { @@ -461,7 +465,11 @@ it->resize(scaleWidth, scaleHeight); // create the buffer to hold our generated base texture +#if OGRE_VERSION_MINOR > 4 + uchar* data = OGRE_ALLOC_T(uchar, width*height*3, MEMCATEGORY_GENERAL); +#else uchar* data = new uchar[width*height*3]; +#endif size_t pos = 0; for (size_t y = 0; y < height; ++y) { @@ -497,7 +505,11 @@ if (colourMap.getWidth() != lightMap.getWidth() || colourMap.getHeight() != lightMap.getHeight()) OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Images must have the same dimensions.", __FUNCTION__); +#if OGRE_VERSION_MINOR > 4 + uchar* data = OGRE_ALLOC_T(uchar, colourMap.getWidth()*colourMap.getHeight()*3, MEMCATEGORY_GENERAL); +#else uchar* data = new uchar[colourMap.getWidth()*colourMap.getHeight()*3]; +#endif for (size_t y = 0; y < colourMap.getWidth(); ++y) { Modified: trunk/python-ogre/ThirdParty/et/ETTerrainInfo.cpp =================================================================== --- trunk/python-ogre/ThirdParty/et/ETTerrainInfo.cpp 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETTerrainInfo.cpp 2008-11-03 07:40:08 UTC (rev 786) @@ -190,6 +190,25 @@ } + /** Addition from SongOfTheWeave */ + Vector3 TerrainInfo::getTangentAt(float x, float z) const + { + Ogre::Vector3 v3Return; + int flip = 1; + Vector3 here (x, getHeightAt(x, z), z); + Vector3 left (x - 1, getHeightAt(x - 1, z), z); + if (left.x < 0.0) + { + flip *= -1; + left = Vector3(x + 1, getHeightAt(x + 1, z), z); + } + left -= here; + v3Return = flip * left; + v3Return.normalise(); + return v3Return; + } + + std::pair<bool, Vector3> TerrainInfo::rayIntersects(const Ray& ray) const { AxisAlignedBox box = getExtents(); Modified: trunk/python-ogre/ThirdParty/et/ETTerrainInfo.h =================================================================== --- trunk/python-ogre/ThirdParty/et/ETTerrainInfo.h 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETTerrainInfo.h 2008-11-03 07:40:08 UTC (rev 786) @@ -107,6 +107,9 @@ /** Calculates the terrain normal at the given coordinates. */ Ogre::Vector3 getNormalAt(float x, float z) const; + /** Calculates the terrain tangent at the given coordinates. */ + Ogre::Vector3 getTangentAt(float x, float z) const; + /** * Checks if a ray intersects with the terrain. * @param ray The ray to check for intersection with the terrain. Modified: trunk/python-ogre/ThirdParty/et/ETTerrainManager.cpp =================================================================== --- trunk/python-ogre/ThirdParty/et/ETTerrainManager.cpp 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETTerrainManager.cpp 2008-11-03 07:40:08 UTC (rev 786) @@ -84,7 +84,7 @@ } - void TerrainImpl::createTerrain(const TerrainInfo& info, size_t tileSize, uint maxLOD, bool vertexNormals) + void TerrainImpl::createTerrain(const TerrainInfo& info, size_t tileSize, uint maxLOD, bool vertexNormals, bool vertexTangents) { // ensure we have a viewport height set if (mOpt.factorC <= 0) @@ -99,8 +99,11 @@ // load new terrain mInfo = info; mOpt.tileSize = tileSize; + if (maxLOD < 1) + maxLOD = 1; mOpt.maxMipMapLevel = min(maxLOD, maxPossibleLOD); mOpt.vertexNormals = vertexNormals; + mOpt.vertexTangents = vertexTangents; mIndexHandler = new IndexHandler(mOpt.tileSize, mOpt.maxMipMapLevel); createTiles(); @@ -332,9 +335,9 @@ delete mImpl; } - void TerrainManager::createTerrain(const TerrainInfo& info, size_t tileSize, uint maxLOD, bool vertexNormals) + void TerrainManager::createTerrain(const TerrainInfo& info, size_t tileSize, uint maxLOD, bool vertexNormals, bool vertexTangents) { - mImpl->createTerrain(info, tileSize, maxLOD, vertexNormals); + mImpl->createTerrain(info, tileSize, maxLOD, vertexNormals, vertexTangents); } void TerrainManager::destroyTerrain() Modified: trunk/python-ogre/ThirdParty/et/ETTerrainManager.h =================================================================== --- trunk/python-ogre/ThirdParty/et/ETTerrainManager.h 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETTerrainManager.h 2008-11-03 07:40:08 UTC (rev 786) @@ -77,8 +77,10 @@ * @param tileSize the tile size to use, must be (2^n+1) * @param maxLOD the maximal level of detail to be used * @param vertexNormals generate vertex normals? (necessary for dynamic lighting) + * @param vertexTangents generate vertex tangents? (necessary for adv. dynamic lighting) */ - void createTerrain(const TerrainInfo& info, size_t tileSize = 33, unsigned int maxLOD = 255, bool vertexNormals = false); + void createTerrain(const TerrainInfo& info, size_t tileSize = 33, unsigned int maxLOD = 255, + bool vertexNormals = false, bool vertexTangents = false); /** Destroys the currently loaded terrain (if any). */ void destroyTerrain(); Modified: trunk/python-ogre/ThirdParty/et/ETTile.cpp =================================================================== --- trunk/python-ogre/ThirdParty/et/ETTile.cpp 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/ETTile.cpp 2008-11-03 07:40:08 UTC (rev 786) @@ -55,8 +55,10 @@ mTerrain(0), mLastNextLevel(0) { + if (mOpt.maxMipMapLevel < 1) + mOpt.maxMipMapLevel = 1; // disable LOD morphing if max LOD is 1 - if (mOpt.maxMipMapLevel <= 1) + if (mOpt.maxMipMapLevel == 1) mOpt.useLODMorph = false; mCastShadows = false; @@ -70,6 +72,7 @@ Tile::~Tile() { + delete mTerrain; } const String& Tile::getMovableType() const @@ -160,6 +163,11 @@ decl->addElement(MAIN_BINDING, offset, VET_FLOAT3, VES_NORMAL); offset += VertexElement::getTypeSize(VET_FLOAT3); } + if (mOpt.vertexTangents) + { + decl->addElement(MAIN_BINDING, offset, VET_FLOAT3, VES_TANGENT); + offset += VertexElement::getTypeSize(VET_FLOAT3); + } decl->addElement(MAIN_BINDING, offset, VET_FLOAT2, VES_TEXTURE_COORDINATES, 0); offset += VertexElement::getTypeSize(VET_FLOAT2); @@ -239,6 +247,9 @@ // calc vertex normals, if necessary if (mOpt.vertexNormals) calculateVertexNormals(); + // calc vertex tangents, if necessary + if (mOpt.vertexTangents) + calculateVertexTangents(); } @@ -275,6 +286,38 @@ } + /** Addition by SongOfTheWeave */ + void Tile::calculateVertexTangents() + { + // set the vertex tangents of the tile + size_t startx = mStartX; + size_t startz = mStartZ; + size_t endx = startx + mOpt.tileSize; + size_t endz = startz + mOpt.tileSize; + //Real minHeight = mInfo.getOffset().y + mInfo.getScaling().y, maxHeight = mInfo.getOffset().y; + + const VertexElement* normElem = mTerrain->vertexDeclaration->findElementBySemantic(VES_TANGENT); + unsigned char* pBase = static_cast<unsigned char*>(mMainBuffer->lock(HardwareBuffer::HBL_NORMAL)); + + for (size_t j = startz; j < endz; ++j) + { + for (size_t i = startx; i < endx; ++i) + { + float* pTan; + normElem->baseVertexPointerToElement(pBase, &pTan); + + Vector3 tangent = mInfo.getTangentAt(mInfo.vertexToPosX((int)i), mInfo.vertexToPosZ((int)j)); + *pTan++ = tangent.x; + *pTan++ = tangent.y; + *pTan++ = tangent.z; + + pBase += mMainBuffer->getVertexSize(); + } + } + mMainBuffer->unlock(); + } + + IndexData* Tile::getIndexData() { IndexData* data = mIndexHandler->requestIndexData(mLOD, @@ -472,7 +515,7 @@ Real range = mLODChangeMinDistSqr[nextLevel] - mLODChangeMinDistSqr[mLOD]; Real percent = (L - mLODChangeMinDistSqr[mLOD]) / range; Real rescale = 1.0f / (1.0f - mOpt.lodMorphStart); - mLODMorphFactor = std::max((percent - mOpt.lodMorphStart), Real(0)); + mLODMorphFactor = std::max((percent - mOpt.lodMorphStart) * rescale, Real(0)); } if (mLastNextLevel != nextLevel) @@ -559,5 +602,14 @@ } +#if OGRE_VERSION_MINOR > 4 + /** Shoggoth compatibility function */ + void Tile::visitRenderables(Renderable::Visitor* visitor, bool debugRenderables) + { + visitor->visit(this, 0, false, 0); + } +#endif + + } } Modified: trunk/python-ogre/ThirdParty/et/Impl/ETOptions.h =================================================================== --- trunk/python-ogre/ThirdParty/et/Impl/ETOptions.h 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/Impl/ETOptions.h 2008-11-03 07:40:08 UTC (rev 786) @@ -44,6 +44,7 @@ float factorC; bool vertexNormals; + bool vertexTangents; bool useLODMorph; float lodMorphStart; Modified: trunk/python-ogre/ThirdParty/et/Impl/ETTerrainImpl.h =================================================================== --- trunk/python-ogre/ThirdParty/et/Impl/ETTerrainImpl.h 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/Impl/ETTerrainImpl.h 2008-11-03 07:40:08 UTC (rev 786) @@ -53,7 +53,7 @@ TerrainImpl(Ogre::SceneManager* sceneMgr, const std::string& name); ~TerrainImpl(); - void createTerrain(const TerrainInfo& info, size_t tileSize, unsigned int maxLOD, bool vertexNormals); + void createTerrain(const TerrainInfo& info, size_t tileSize, unsigned int maxLOD, bool vertexNormals, bool vertexTangents); void destroyTerrain(); bool isTerrainLoaded() const { return mTerrainLoaded; } Modified: trunk/python-ogre/ThirdParty/et/Impl/ETTile.h =================================================================== --- trunk/python-ogre/ThirdParty/et/Impl/ETTile.h 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/ThirdParty/et/Impl/ETTile.h 2008-11-03 07:40:08 UTC (rev 786) @@ -105,6 +105,12 @@ */ void updateTerrain(size_t startx, size_t startz, size_t endx, size_t endz); + +#if OGRE_VERSION_MINOR > 4 + /** Shoggoth compatibility function */ + void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables); +#endif + private: /** Initialises the vertices */ void createVertexData(size_t startx, size_t startz); @@ -116,6 +122,9 @@ /** Calculates vertex normals */ void calculateVertexNormals(); + /** Calculates vertex tangents */ + void calculateVertexTangents(); + /** Retrieves the position vector for the given vertex */ Ogre::Vector3 getVector(size_t x, size_t z) const; Modified: trunk/python-ogre/code_generators/betagui/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/betagui/customization_data.py 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/code_generators/betagui/customization_data.py 2008-11-03 07:40:08 UTC (rev 786) @@ -1,6 +1,6 @@ def header_files( version ): - return [ 'BetaGUI.h'] + return [ 'BetaGUI2.h'] def huge_classes( version ): return [] Modified: trunk/python-ogre/code_generators/betagui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/betagui/generate_code.py 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/code_generators/betagui/generate_code.py 2008-11-03 07:40:08 UTC (rev 786) @@ -42,7 +42,7 @@ import common_utils.var_checker as varchecker import common_utils.ogre_properties as ogre_properties -MAIN_NAMESPACE = 'BetaGUI' +MAIN_NAMESPACE = 'BetaGUI2' ## small helper function def docit ( general, i, o ): @@ -99,26 +99,26 @@ global_ns = mb.global_ns main_ns = global_ns.namespace( MAIN_NAMESPACE ) - ## now expose but don't create class that exist in other modules - global_ns.namespace( 'Ogre' ).class_('OverlayContainer').include(already_exposed=True) - global_ns.namespace( 'Ogre' ).class_('Vector2').include(already_exposed=True) -# global_ns.namespace( 'Ogre' ).class_('Vector3').include(already_exposed=True) - global_ns.namespace( 'Ogre' ).class_('Vector4').include(already_exposed=True) - global_ns.namespace( 'Ogre' ).class_('RenderWindow').include(already_exposed=True) -# global_ns.namespace( 'Ogre' ).class_('RenderTexture').include(already_exposed=True) - global_ns.namespace( 'Ogre' ).class_('RenderOperation').include(already_exposed=True) -# global_ns.namespace( 'Ogre' ).class_('UTFString').include(already_exposed=True) -# global_ns.class_('::Ogre::FontPtr').include(already_exposed=True) -# global_ns.class_('::Ogre::RenderQueueListener').include(already_exposed=True) -# global_ns.class_('::Ogre::SceneManager').include(already_exposed=True) +# ## now expose but don't create class that exist in other modules +# global_ns.namespace( 'Ogre' ).class_('OverlayContainer').include(already_exposed=True) +# global_ns.namespace( 'Ogre' ).class_('Vector2').include(already_exposed=True) +# # global_ns.namespace( 'Ogre' ).class_('Vector3').include(already_exposed=True) +# global_ns.namespace( 'Ogre' ).class_('Vector4').include(already_exposed=True) +# global_ns.namespace( 'Ogre' ).class_('RenderWindow').include(already_exposed=True) +# # global_ns.namespace( 'Ogre' ).class_('RenderTexture').include(already_exposed=True) +# global_ns.namespace( 'Ogre' ).class_('RenderOperation').include(already_exposed=True) +# # global_ns.namespace( 'Ogre' ).class_('UTFString').include(already_exposed=True) +# # global_ns.class_('::Ogre::FontPtr').include(already_exposed=True) +# # global_ns.class_('::Ogre::RenderQueueListener').include(already_exposed=True) +# # global_ns.class_('::Ogre::SceneManager').include(already_exposed=True) +# # +# # +# # global_ns.namespace( 'Ogre' ).class_('Singleton<QuickGUI::GUIManager>').include() #already_exposed=True) +# # global_ns.namespace( 'Ogre' ).class_('Singleton<QuickGUI::MouseCursor>').include() #already_exposed=True) +# # global_ns.namespace( 'Ogre' ).class_('Singleton<QuickGUI::FontManager>').include() #already_exposed=True) # -# -# global_ns.namespace( 'Ogre' ).class_('Singleton<QuickGUI::GUIManager>').include() #already_exposed=True) -# global_ns.namespace( 'Ogre' ).class_('Singleton<QuickGUI::MouseCursor>').include() #already_exposed=True) -# global_ns.namespace( 'Ogre' ).class_('Singleton<QuickGUI::FontManager>').include() #already_exposed=True) - -# global_ns.namespace( 'Ogre' ).class_('PanelOverlayElement').include(already_exposed=True) -# global_ns.namespace( 'Ogre' ).class_('TextAreaOverlayElement').include(already_exposed=True) +# # global_ns.namespace( 'Ogre' ).class_('PanelOverlayElement').include(already_exposed=True) +# # global_ns.namespace( 'Ogre' ).class_('TextAreaOverlayElement').include(already_exposed=True) Modified: trunk/python-ogre/code_generators/betagui/python_betagui.h =================================================================== --- trunk/python-ogre/code_generators/betagui/python_betagui.h 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/code_generators/betagui/python_betagui.h 2008-11-03 07:40:08 UTC (rev 786) @@ -1,4 +1,5 @@ -#include "BetaGUI.h" +typedef float NxReal; +#include "BetaGUI2.h" // First we create a magic namespace to hold all our aliases namespace pyplusplus { namespace aliases { @@ -8,9 +9,9 @@ // then we exposed everything needed (and more) to ensure GCCXML makes them visible to Py++ // -namespace python_BetaGUI{ namespace details{ +namespace python_BetaGUI2{ namespace details{ inline void instantiate(){ - using namespace BetaGUI; + using namespace BetaGUI2; #include "python_betagui_sizeof.h" } } } Modified: trunk/python-ogre/demos/ogre/Demo_Bezier.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Bezier.py 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/demos/ogre/Demo_Bezier.py 2008-11-03 07:40:08 UTC (rev 786) @@ -241,11 +241,11 @@ sf.Application.debugText = "STARTED" - def _destroyScene(self): +# # # def __del__(self): +# # # +# # # ## free up the pointer before we shut down OGRE +# # # patch.setNull() - ## free up the pointer before we shut down OGRE - patch.setNull() - def _createFrameListener(self): self.frameListener = BezierListener(self.renderWindow, self.camera) self.root.addFrameListener(self.frameListener) Modified: trunk/python-ogre/demos/ogre/Demo_Smoke.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Smoke.py 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/demos/ogre/Demo_Smoke.py 2008-11-03 07:40:08 UTC (rev 786) @@ -27,11 +27,13 @@ self.fountainNode = sceneManager.getRootSceneNode().createChildSceneNode() psm = ogre.ParticleSystemManager.getSingleton() - particleSystem2 = sceneManager.createParticleSystem('fountain1', 'Examples/Smoke') + self.particleSystem2 = sceneManager.createParticleSystem('fountain1', 'Examples/Smoke') node = self.fountainNode.createChildSceneNode() - node.attachObject(particleSystem2) + node.attachObject(self.particleSystem2) - + def __del__(self): + del self.particleSystem2 + sf.Application.__del__(self) if __name__ == '__main__': try: Modified: trunk/python-ogre/demos/plugins.cfg =================================================================== --- trunk/python-ogre/demos/plugins.cfg 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/demos/plugins.cfg 2008-11-03 07:40:08 UTC (rev 786) @@ -2,23 +2,22 @@ ## Use this for Windows # Define plugin folder -#PluginFolder=../../plugins -#Plugin=RenderSystem_GL.dll -#Plugin=RenderSystem_Direct3D9.dll -#Plugin=Plugin_ParticleFX.dll -#Plugin=Plugin_BSPSceneManager.dll -#Plugin=Plugin_OctreeSceneManager.dll -#Plugin=Plugin_CgProgramManager.dll -#Plugin=Plugin_PCZSceneManager.dll -#Plugin=Plugin_OctreeZone.dll -#Plugin=Plugin_OctreeSceneManager.dll +PluginFolder=../../plugins +Plugin=RenderSystem_GL.dll +Plugin=RenderSystem_Direct3D9.dll +Plugin=Plugin_ParticleFX.dll +Plugin=Plugin_BSPSceneManager.dll +Plugin=Plugin_CgProgramManager.dll +Plugin=Plugin_PCZSceneManager.dll +Plugin=Plugin_OctreeZone.dll +Plugin=Plugin_OctreeSceneManager.dll ## ## NOTE use this for MacOS or Linux -PluginFolder=/home/andy/development/root/usr/lib/OGRE -Plugin=RenderSystem_GL -Plugin=Plugin_ParticleFX -Plugin=Plugin_BSPSceneManager -Plugin=Plugin_OctreeSceneManager -Plugin=Plugin_CgProgramManager +#PluginFolder=/home/andy/development/root/usr/lib/OGRE +#Plugin=RenderSystem_GL +#Plugin=Plugin_ParticleFX +#Plugin=Plugin_BSPSceneManager +#Plugin=Plugin_OctreeSceneManager +#Plugin=Plugin_CgProgramManager Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-10-31 08:18:17 UTC (rev 785) +++ trunk/python-ogre/environment.py 2008-11-03 07:40:08 UTC (rev 786) @@ -1119,21 +1119,26 @@ class betagui: active = True pythonModule = True - version="1.7" + version="2" name='betagui' parent="ogre/gui" CCFLAGS = ' ' # -D"FT2_BUILD_LIBRARY" cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, + Config.PATH_INCLUDE_OIS, Config.PATH_INCLUDE_betagui ] lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, - Config.PATH_LIB_betagui + Config.PATH_LIB_betagui, + Config.PATH_LIB_OIS ] CheckIncludes=[] - libs=[ boost.lib, 'OgreMain' ] + libs=[ boost.lib, 'OgreMain', 'OIS_Static' ] + if os.name=="nt": + libs.append ( "User32" ) # needed for static linking + ModuleName="betagui" class ogreforests: @@ -1389,20 +1394,20 @@ ["wget", "http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz",downloadPath], ] buildCmds = [ -# [0, "tar zxf " + os.path.join(downloadPath, "openal-0.0.8.tar.gz"), ''], +# [0, "tar zxf " + os.path.join(downloadPath, "openal-0.0.8.tar.gz"), ''], [0, "tar jxf " + os.path.join(downloadPath, "openal-soft-1.5.304.tar.bz2"), ''], [0, "tar zxf " + os.path.join(downloadPath, "libogg-1.1.3.tar.gz"), ''], [0, "tar zxf " + os.path.join(downloadPath, "libvorbis-1.2.0.tar.gz"), ''], [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "libogg-1.1.3")], - - [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "libvorbis-1.2.0")], - - [0,"cmake -DCMAKE_INSTALL_PREFIX:PATH="+ PREFIX, os.path.join(os.getcwd(),'openal-soft-1.5.304')], - [0,"make ", os.path.join(os.getcwd(),'openal-soft-1.5.304')], - [0,"cp -p libopenal* %s/lib " % PREFIX, os.path.join(os.getcwd(),'openal-soft-1.5.304')], - [0,"cp -p * %s/include " % PREFIX, os.path.join(os.getcwd(),'openal-soft-1.5.304', 'include','AL')] - + + [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "libvorbis-1.2.0")], + + [0,"cmake -DCMAKE_INSTALL_PREFIX:PATH="+ PREFIX, os.path.join(os.getcwd(),'openal-soft-1.5.304')], + [0,"make ", os.path.join(os.getcwd(),'openal-soft-1.5.304')], + [0,"cp -p libopenal* %s/lib " % PREFIX, os.path.join(os.getcwd(),'openal-soft-1.5.304')], + [0,"cp -p * %s/include " % PREFIX, os.path.join(os.getcwd(),'openal-soft-1.5.304', 'include','AL')] + # [0, "sed --in-place -s 's|( ALCvoid )|()|' alc.h",os.path.join(os.getcwd(),"openal-0.0.8","common", "include", "AL")], # [0, "aclocal\n./autogen.sh", os.path.join(os.getcwd(),"openal-0.0.8")], # [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "openal-0.0.8")] @@ -1470,7 +1475,7 @@ class et: ## editable terrain active = True pythonModule = True - version= "2.2" + version= "2.3.1" name='et' parent = "ogre/addons" if isLinux(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |