Page 1 of 1

Importing DarkSDK into PureBASIC

Posted: Tue Nov 04, 2008 11:45 am
by freddix
Hi All,
This post directly follow the last one :
http://www.purebasic.fr/english/viewtopic.php?t=34927
Now FLOATS are correctly handled, INTEGER and STRINGS too :)

I've made good progress integrating the latest DarkSDK .lib pack into PureBASIC 4.30 Beta X.
I actually can include all PureSDK .lib and make any program to compile.
I can create 3D object, Load Images, Texture Objects, Load sound and play them, etc ...

But I've found a really strange bug that seem to be related to Direct3D or directly to Direct3D Texture handling.

In fact, I will detail what work and what crash :
Load Object Ok
Use Loaded object in 3D render Crash
Create Object Ok
Use created object in 3D render Ok

Load Image Ok
Texture created Object with loaded image Ok
Paste Image Crash

Does someone one have any clue on from where this problem can came ?
Can it be caused by how PureBASIC program start when compiled ?

Posted: Tue Nov 04, 2008 6:54 pm
by Mistrel
Are you calling the function correctly? It might be a typo in the function name.

Posted: Thu Nov 06, 2008 12:12 pm
by freddix
Yes, all is correctly used.

If I do something like this

Code: Select all

dbloadobject( "File.x", 1 )
dbdeleteobject( 1 )
Reoeat
  dbsync()
Until dbescapekey() = 1
All run fine

I can also create a 3D object and see it on screen but if I do this :

Code: Select all

dbloadobject( "File.x", 1 )
Reoeat
  dbsync()
Until dbescapekey() = 1
I get a crash.

Same for image, I can load an image and texture a created object with it but, I can't paste image on screen (crash)

I really think it's something internal.

Regards,
Fred