dermont
08-08-2006 13:57:43
I've enountered some problems parsing a datastream from a dotsceneoctree file. The same code worked with mingw and earlier versions of pyogre. With VisualC++ 2005 "getAsString" occasionaly works but mostly crashes. "pStream.read(pStream.size())" always works.
The code is as follows:
Reading this thread I updated the c++ Code Generation Multi-Threaded (/MT) to DLL (/MD):
http://www.ogre3d.org/phpBB2/viewtopic. ... etasstring
I'm not really familiar with VC++2005 so I'm not sure of the implications of doing the above but I'm quite suprised that this hasn't been raised before.
The code is as follows:
pStream = ogre.ResourceGroupManager.getSingleton().openResource("Example.material",'General')
#data = pStream.getAsString()
data = pStream.read(pStream.size())
print data
# MyScene.scene is just an xml file
#pStream = ogre.ResourceGroupManager.getSingleton().openResource("MyScene.scene", "General")
#data = pStream.getAsString()
#data = pStream.read(pStream.size())
#print data
Reading this thread I updated the c++ Code Generation Multi-Threaded (/MT) to DLL (/MD):
http://www.ogre3d.org/phpBB2/viewtopic. ... etasstring
I'm not really familiar with VC++2005 so I'm not sure of the implications of doing the above but I'm quite suprised that this hasn't been raised before.