HomeHome  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 OpenSceneGraph (OSG) and Spark

Go down 
AuthorMessage
Xatpy



Messages : 2
Date d'inscription : 2014-05-13

OpenSceneGraph (OSG) and Spark Empty
PostSubject: OpenSceneGraph (OSG) and Spark   OpenSceneGraph (OSG) and Spark Icon_minitimeTue May 13, 2014 6:56 am

Hi everyone,

I want to ask if somebody know how to compile and integrate OpenSceneGraph with Spark engine.

I tried using osgRecipes Spark integration ( https://github.com/xarray/osgRecipes/tree/master/integrations/osgspark ) , but I can't compile it. It has linking errors.

I don't know if I am using an incorrect library version. The related link of Spark in the wiki page of osgRecipes ( https://github.com/xarray/osgRecipes/wiki ) is not working: http://sark.developpez.com/

So, I downloaded the version 1.5.5 from http://sourceforge.net/projects/sparkengine/ but it is still not working.

In this link I posted the linked errors: https://github.com/xarray/osgRecipes/issues/11

Thanks!
Back to top Go down
Darktib
Committer
Darktib

Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

OpenSceneGraph (OSG) and Spark Empty
PostSubject: Re: OpenSceneGraph (OSG) and Spark   OpenSceneGraph (OSG) and Spark Icon_minitimeTue May 13, 2014 1:52 pm

You downloaded the 1.5.5 version which is old, the new one is the 2.0 which is still in "beta" (although the code is quite stable). This version is only available on svn (I will create a package when the 64bit portability will be done).

However, the integration with OpenSceneGraph you linked seems to use the 1.5.5, so it is likely that you have the correct version. Now, your errors:

Code:

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

LNK2001: "unsigned long const SPK::NO_ID" (?NO_ID@SPK@@3KB)
LNK2019: __imp__glTexImage2D@36 -- "protected: unsigned int __thiscall SparkDrawable::compileInternalTexture(class osg::Image *,unsigned int,unsigned int)const " (?compileInternalTexture@SparkDrawable@@IBEIPAVImage@osg@@II@Z)
LNK2019: __imp__glTexParameteri@12 -- "protected: unsigned int __thiscall SparkDrawable::compileInternalTexture(class osg::Image *,unsigned int,unsigned int)const " (?compileInternalTexture@SparkDrawable@@IBEIPAVImage@osg@@II@Z)
LNK2019: __imp__glBindTexture@8 -- "protected: unsigned int __thiscall SparkDrawable::compileInternalTexture(class osg::Image *,unsigned int,unsigned int)const " (?compileInternalTexture@SparkDrawable@@IBEIPAVImage@osg@@II@Z)
LNK2019: __imp__glGenTextures@8 -- "protected: unsigned int __thiscall SparkDrawable::compileInternalTexture(class osg::Image *,unsigned int,unsigned int)const " (?compileInternalTexture@SparkDrawable@@IBEIPAVImage@osg@@II@Z)

This is the right link order. However, all these functions are "SparkDrawable", which is the osg integration, not SPARK. You should verify how you link to this integration.

For the constant 'NO_ID', try adding the following definition to your project preprocessor options: SPK_IMPORT

_________________
OpenSceneGraph (OSG) and Spark A824d8828e17173a5d5b383b8744118b28a79bc96c7deba8910bed109308d4304g
Back to top Go down
Xatpy



Messages : 2
Date d'inscription : 2014-05-13

OpenSceneGraph (OSG) and Spark Empty
PostSubject: Re: OpenSceneGraph (OSG) and Spark   OpenSceneGraph (OSG) and Spark Icon_minitimeFri May 16, 2014 6:21 am

Thanks Darktib!!

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:

- osgspark.cpp (line 50) ===> //SPK::randomSeed = static_cast<unsigned int>( time(NULL) ); I had to comment this line.

- SparkDrawable.cpp ===> SPK::NO_ID not found. So, I replace SPK::NO_ID with 0 in:
### SparkDrawable.h (line 60) bool isValid() const { return getBaseSystemID()!=SPK::NO_ID && _protoSystem!=NULL; }
### SparkDrawable.cpp - Constructor (line 25) _baseSystemID(SPK::NO_ID)

Finally, I have Spark Engine working with OSG Smile
Back to top Go down
Sponsored content




OpenSceneGraph (OSG) and Spark Empty
PostSubject: Re: OpenSceneGraph (OSG) and Spark   OpenSceneGraph (OSG) and Spark Icon_minitime

Back to top Go down
 
OpenSceneGraph (OSG) and Spark
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: