HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 spark explosion demo crash-vs2010-opengl-sdl

View previous topic View next topic Go down 
AuthorMessage
axel112



Messages : 3
Date d'inscription : 2013-05-05

PostSubject: spark explosion demo crash-vs2010-opengl-sdl    Sun May 05, 2013 11:49 am

Hello, I'd like to use the explosion demo source for a video game project. I am using visual studio 2010 and openGL with SDL on windows 7 64bit. I downloaded the latest release 1.5.5. The demo exe provided work but when I try to rebuild it myself it does crash.
The function setTexturingMode(TEXTURE_2D) seems to be responsible, if I comment the line the program does not crash anymore, it display the number of particle and the fps in the left corner of the screen but I won't have any explosion when I push the space bar like in the working exe provided. Otherwise the program will launch an empty black screen and crash.
If someone could help me it would be great. Thank you.
The building succed but they are errors:

(sorry it is partly in french)
1>------ Build started: Project: Battle_Tanks, Configuration: Debug Win32 ------
1>Build started 05/05/2013 16:25:46.
1>InitializeBuildStatus:
1> Creating "Debug\Battle_Tanks.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1> ExplosionDemo.cpp
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>Link:
1> ftgl_static.lib(FTFont.obj) : .netmodule ou module MSIL compilé avec /GL trouvé ; redémarrage de l'édition de liens avec /LTCG ; ajoutez /LTCG à la ligne de commande de l'édition de liens pour améliorer les performances de l'Éditeur de liens
1>LINK : warning LNK4075: ' /INCREMENTAL' ignoré à cause de la spécification '/LTCG'
1>ExplosionDemo.obj : warning LNK4075: ' /EDITANDCONTINUE' ignoré à cause de la spécification '/OPT:ICF'
1>LINK : warning LNK4098: conflit entre la bibliothèque par défaut 'MSVCRT' et les autres bibliothèques ; utilisez /NODEFAULTLIB:library
1> Génération de code en cours
1> Fin de la génération du code
1>Manifest:
1> All outputs are up-to-date.
1>LinkEmbedManifest:
1> All outputs are up-to-date.
1> Battle_Tanks.vcxproj -> C:\Users\Axel\Desktop\GAME\Battle_Tanks\Debug\Battle_Tanks.exe
1>FinalizeBuildStatus:
1> Deleting file "Debug\Battle_Tanks.unsuccessfulbuild".
1> Touching "Debug\Battle_Tanks.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:01.66
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========





Code:
// Creates the base system and returns its ID
SPK_ID createParticleSystemBase(GLuint textureExplosion,GLuint textureFlash,GLuint textureSpark1,GLuint textureSpark2,GLuint textureWave)
{
   ///////////////
   // Renderers //
   ///////////////
   
   // smoke renderer
   GLQuadRenderer* smokeRenderer = GLQuadRenderer::create();
   smokeRenderer->setTexturingMode(TEXTURE_2D);
[color=red]   //smokeRenderer->setTexture(textureExplosion);[/color]
   smokeRenderer->setTextureBlending(GL_MODULATE);
   smokeRenderer->setAtlasDimensions(2,2); // uses 4 different patterns in the texture
   smokeRenderer->setBlending(BLENDING_ALPHA);
   smokeRenderer->enableRenderingHint(DEPTH_WRITE,false);
   smokeRenderer->setShared(true);

with setTexturingMode comented:


without:



Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: spark explosion demo crash-vs2010-opengl-sdl    Mon May 06, 2013 3:52 am

Hi,

Have you recompiled spark and sparl_gl along with the demos ?
Back to top Go down
View user profile http://spark.developpez.com
axel112



Messages : 3
Date d'inscription : 2013-05-05

PostSubject: Re: spark explosion demo crash-vs2010-opengl-sdl    Mon May 06, 2013 5:43 am

Hi,
No I didn't, I opened the spark demo explosion.vcproj in the vc2008 folder with visual 2010 and make sure that all the library and include directory are corrects.
thanks you
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: spark explosion demo crash-vs2010-opengl-sdl    Mon May 06, 2013 7:00 am

Well you need to recompile the libs as well (dynamic version), then compile the demos and paste the SPARK.dll and SPARK_GL dll from lib directory to the demos one.

If you re compiling the demos in 64 bits and uses 32 bits versions of libs (or VS2010 and vs2008 versions)... you ll get undefined behavior resulting in a crash most of the time.
Back to top Go down
View user profile http://spark.developpez.com
axel112



Messages : 3
Date d'inscription : 2013-05-05

PostSubject: Thank you   Mon May 06, 2013 8:41 am

It's working. Thank you so much.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: spark explosion demo crash-vs2010-opengl-sdl    Today at 3:39 am

Back to top Go down
 
spark explosion demo crash-vs2010-opengl-sdl
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Should Nintendo Release A Splatoon Demo And Advertise The Heck Out of It?
» how to put this slider into my annoucement
» Moto Heroz (NL Racers)
» FE7 Batta Mode DEMO
» Super Smash Bros. for 3DS demo first impressions

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