- Sat Oct 31, 2015 4:55 pm
#389111
Hi.
I use Maxwell SDK 3.2.0, Visual Studio 2013,using v120 toolset
In simple console application, i trying create simple scene with only one particle object,
try to get her points. But every time in getProxyDisplayPoints line app crash.
Code bellow
E:/Particle_Test_01.bin is a simple particles object downloaded from http://support.nextlimit.com/display/mx ... +Particles.
mxcommon library located in same directory where placed executable file, and it loaded properly.
Other extentions types work successfull.
Application crashed in
I use Maxwell SDK 3.2.0, Visual Studio 2013,using v120 toolset
In simple console application, i trying create simple scene with only one particle object,
try to get her points. But every time in getProxyDisplayPoints line app crash.
Code bellow
Code: Select all
E:/ext is a path where maxwell extenstion located(copied from maxwell 3.2 directory)#include <iostream>
#include "stdafx.h"
#include "maxwell.h"
#include "mx_defines.h"
#include "mx_extensionmanager.h"
#include "mx_geometryextension.h"
#include "mx_paramlist.h"
byte mx_error_callback(byte isError, const char *pMethod, const char *string, const void *data)
{
if (isError)
{
printf( "Error in Method = %s \n error = %s \n value = %d\n", pMethod, string, data );
}
return (0);
}
int _tmain(int argc, _TCHAR* argv[])
{
Cmaxwell previewScene(mx_error_callback);
previewScene.setAxisConversion("YXZ");
previewScene.setSinglePrecisionOfGeometry();
CextensionManager::instance()->setExtensionsDirectory("E:/ext");
CextensionManager::instance()->loadAllExtensions();
CextensionManager::instance()->InitializeAllExtensions();
CgeometryProceduralExtension *gExtension = CextensionManager::instance()->createDefaultGeometryProceduralExtension("MaxwellParticles");
if (gExtension != NULL)
{
MXparamList *pl = gExtension->getExtensionData();
pl->setString("FileName", "E:/Particle_Test_01.bin");
Cmaxwell::Cobject previewObject = previewScene.createGeometryProceduralObject("particles", pl);
//
gExtension->initializeForRendering(&previewScene, previewObject) << std::endl;
//
float *points;
dword nPoints = 0;
gExtension->getProxyDisplayPoints(10, 1000, nPoints, points);
std::cout << "Num of points" << nPoints << std::endl;
pl->clear();
pl->free();
delete points;
gExtension->cleanup(&previewScene);
delete gExtension;
}
previewScene.writeMXS("E:/test.mxs");
previewScene.freeGeometry();
previewScene.freeScene();
return 0;
}
E:/Particle_Test_01.bin is a simple particles object downloaded from http://support.nextlimit.com/display/mx ... +Particles.
mxcommon library located in same directory where placed executable file, and it loaded properly.
Other extentions types work successfull.
Application crashed in
Code: Select all
line, for MaxwellVolumetric, too.gExtension->getProxyDisplayPoints(10, 1000, nPoints, points);