xarray / osgRecipes

OpenSceneGraph (OSG) Recipes
348 stars 167 forks source link

Spark integration #11

Closed Xatpy closed 10 years ago

Xatpy commented 10 years ago

First of all, great work! I want to integrate Spark particle. However, the link related ( http://spark.developpez.com/ ) doesn't work. I have downloaded version 1.5.5 from http://sourceforge.net/projects/sparkengine/ , but it has link errors. I am using Visual Studio 2010. I tried with 2008 libraries, and recompiling with VS2010, but no success. How can I integrate it with OSG? Thanks!

xarray commented 10 years ago

Could you show what the link errors you've encountered? The integrationworks with spark1 (the trunk of the Spark project) but I've never tested it with spark2 (which seems to be an experiment at present)

Xatpy commented 10 years ago

I am using http://sourceforge.net/projects/sparkengine/files/latest/download

The errors are:

--------- If I link with: SPARK_debug.lib and SPARK_GL_debug.lib:

LNK2001: "unsigned long const SPK::NO_ID" (?NO_ID@SPK@@3KB) LNK2019: impglTexImage2D@36 -- "protected: unsigned int thiscall SparkDrawable::compileInternalTexture(class osg::Image *,unsigned int,unsigned int)const " (?compileInternalTexture@SparkDrawable@@IBEIPAVImage@osg@@II@Z) LNK2019: impglTexParameteri@12 -- "protected: unsigned int thiscall SparkDrawable::compileInternalTexture(class osg::Image ,unsigned int,unsigned int)const " (?compileInternalTexture@SparkDrawable@@IBEIPAVImage@osg@@II@Z) LNK2019: impglBindTexture@8 -- "protected: unsigned int __thiscall SparkDrawable::compileInternalTexture(class osg::Image ,unsigned int,unsigned int)const " (?compileInternalTexture@SparkDrawable@@IBEIPAVImage@osg@@II@Z) LNK2019: impglGenTextures@8 -- "protected: unsigned int __thiscall SparkDrawable::compileInternalTexture(class osg::Image *,unsigned int,unsigned int)const " (?compileInternalTexture@SparkDrawable@@IBEIPAVImage@osg@@II@Z)

--------- If I link with: SPARK_debug.lib and SPARK_GL_debug.lib: 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglGetString@4 -- "public: static bool cdecl SPK::GL::GLExtHandler::loadGLExtPointSprite(void)" (?loadGLExtPointSprite@GLExtHandler@GL@SPK@@SA_NXZ) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impwglGetProcAddress@4 -- "protected: static void * cdecl SPK::GL::GLExtHandler::glGetProcAddress(char const *)" (?glGetProcAddress@GLExtHandler@GL@SPK@@KAPAXPBD@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglPointSize@4 -- "protected: static void cdecl SPK::GL::GLExtHandler::enablePointParameterGLExt(float,bool)" (?enablePointParameterGLExt@GLExtHandler@GL@SPK@@KAXM_N@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglPushAttrib@4 -- "public: static void cdecl SPK::GL::GLRenderer::saveGLStates(void)" (?saveGLStates@GLRenderer@GL@SPK@@SAXXZ) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglPopAttrib@0 -- "public: static void cdecl SPK::GL::GLRenderer::restoreGLStates(void)" (?restoreGLStates@GLRenderer@GL@SPK@@SAXXZ) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglDisableClientState@4 -- "public: virtual void thiscall SPK::GL::GLLineRenderer::render(class SPK::Group const &)" (?render@GLLineRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglDrawArrays@12 -- "public: virtual void thiscall SPK::GL::GLLineRenderer::render(class SPK::Group const &)" (?render@GLLineRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglColorPointer@16 -- "public: virtual void thiscall SPK::GL::GLLineRenderer::render(class SPK::Group const &)" (?render@GLLineRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglVertexPointer@16 -- "public: virtual void thiscall SPK::GL::GLLineRenderer::render(class SPK::Group const &)" (?render@GLLineRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglEnableClientState@4 -- "public: virtual void thiscall SPK::GL::GLLineRenderer::render(class SPK::Group const &)" (?render@GLLineRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglShadeModel@4 -- "public: virtual void thiscall SPK::GL::GLLineRenderer::render(class SPK::Group const &)" (?render@GLLineRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglDisable@4 -- "public: virtual void thiscall SPK::GL::GLLineRenderer::render(class SPK::Group const &)" (?render@GLLineRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglLineWidth@4 -- "public: virtual void thiscall SPK::GL::GLLineRenderer::render(class SPK::Group const &)" (?render@GLLineRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglEnable@4 -- "public: virtual void thiscall SPK::GL::GLPointRenderer::render(class SPK::Group const &)" (?render@GLPointRenderer@GL@SPK@@UAEXABVGroup@3@@Z) 1>SPARK_GL_debug.lib(SPK_GL_All.obj) : LNK2019: impglBlendFunc@8 -- "protected: void __thiscall SPK::GL::GLRenderer::initBlending(void)const " (?initBlending@GLRenderer@GL@SPK@@IBEXXZ)

What SDK should I use?

Xatpy commented 10 years ago

I solved it!

I linked with last version in Spark SVN (https://svn.code.sf.net/p/sparkengine/code/), using SPARK Engine CORE DLL.lib and SPARK Engine GL DLL.lib.

The problem were in:

Finally, I have Spark Engine working with OSG Smile

xarray commented 10 years ago

Thanks and well done Xatpy! :-) And sorry for the delay because of some client work.