Xatpy
Messages : 2 Date d'inscription : 2014-05-13
| Subject: OpenSceneGraph (OSG) and Spark Tue May 13, 2014 6:56 am | |
| | |
|
Darktib Committer
Messages : 389 Date d'inscription : 2009-07-20 Localisation : A coté de Paris
| Subject: Re: OpenSceneGraph (OSG) and Spark Tue 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 | |
|
Xatpy
Messages : 2 Date d'inscription : 2014-05-13
| Subject: Re: OpenSceneGraph (OSG) and Spark Fri 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 | |
|
Sponsored content
| Subject: Re: OpenSceneGraph (OSG) and Spark | |
| |
|