CreateMesh invalid memory access

Just starting out? Need help? Post your questions and find answers here.
banban73
User
User
Posts: 21
Joined: Sun Jul 18, 2004 12:03 pm
Location: Bergerac - France

CreateMesh invalid memory access

Post by banban73 »

Hello,

I tried to use the CreateMesh() command, but its execution returns an "invalid memory access" even in its simplest form :

Code: Select all

If InitEngine3D()=0
  End
EndIf

CreateMesh(0,10) -----> Invalid memory access

FreeMesh(0)

End
According to the doc, first parameter is mesh Id, second is max number of vertices.
I tried several values for these two parameters with no success.

Can anyone please help me understand what happens ?

Thank you in advance
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

You must add a 3DArchive using the 'Add3DArchive' PB command. This one stumped me a while when writing my book. :wink:
--Kale

Image
banban73
User
User
Posts: 21
Joined: Sun Jul 18, 2004 12:03 pm
Location: Bergerac - France

Post by banban73 »

Thank You Kale for answering.
I added 3DArchive and opened a screen before calling createMesh and now, it works fine.

Best regards
Post Reply