Gamestudio Links
Zorro Links
Newest Posts
nba2king Latest Roster Update Breakdown
by joenxxx. 10/14/25 06:06
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Grant, joenxxx), 9,921 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
DirectX guru needed! Questions about ID3DXMESH->Release(); #402449
06/05/12 12:53
06/05/12 12:53
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Hiya guys...

Ive got a bit of an odd one here. Im doing some LPD3DXMESH juggling and Ive hit a snag.
This is crudely what Im doing... (pseudo-code, not actual syntax)

LPD3DXMESH mesh0 = ent_getmesh(ent,0,0);
LPD3DXMESH mesh1 = D3DXCreateMesh(...);
ent_setmesh(ent,mesh1,0,0);
mesh0->Release();

All works fine, now here is the rub...

At home on my Win7 machine it works fine...
But here at work it crashes when it hits the Release() calls...
(Both computers are running 8.30.5 commercial, and both have Nvidia video cards)


Any ideas anyone?


Secondary to that issue... is 'Release" NECESSARY with gamestudio?
I will be running it quite often so these left-over meshes must
be cleared out during run-time, otherwise I will have problems...


Thankx muchly guys and gals...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: DirectX guru needed! Questions about ID3DXMESH->Release(); [Re: EvilSOB] #402452
06/05/12 13:36
06/05/12 13:36
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
Im not the guru your looking for but to further stress this ,i have
same situation i cant use release it crashes on release ,i have windows 7 ultimate
also nvidia card i think i have directx 10 or 11 cant remember now but i share the problem
aswell i try using sysfree dont think it works i dong know but i use it anyway


Compulsive compiler
Re: DirectX guru needed! Questions about ID3DXMESH->Release(); [Re: Wjbender] #402465
06/05/12 22:04
06/05/12 22:04
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Not sure if this should work, but try this way:

Code:
LPD3DXMESH mesh0 = ent_getmesh(ent,0,0);
LPD3DXMESH mesh1 = D3DXCreateMesh(...);
ent_setmesh(ent,mesh1,0,0);

// deallocate mesh at end of level or game
mesh0 = ent_getmesh(ent,0,0);
mesh0->Release();
ent_setmesh(ent,NULL,0,0);



Originally Posted By: EvilSOB
Secondary to that issue... is 'Release" NECESSARY with gamestudio?

Quote:
You can set a mesh that you've allocated, but you should then release it yourself at the end of the game



Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: DirectX guru needed! Questions about ID3DXMESH->Release(); [Re: rojart] #402474
06/06/12 05:29
06/06/12 05:29
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Wjbender :: Mine is the other way around... It works in Win7, but fails in XP.

Rojart :: That dont help me much dude. Im going to be generating too many
to wait till engine-exit, cause I may not de doing level_load's.
I NEED to release them 'on the fly'.

But at least I now know they DO need to be released, I just gotta figure out HOW...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: DirectX guru needed! Questions about ID3DXMESH->Release(); [Re: EvilSOB] #417150
02/09/13 03:55
02/09/13 03:55
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
This is an old thread, but here is a solution which works for me:
Quote:
ent_setmesh((p_Block)->Entity, NULL, 0, 0);

(p_Block->Mesh)->Release();
p_Block->Mesh = newMesh;

ent_setmesh(p_Block->Entity, newMesh, 0, 0);
Without ent_setmesh((p_Block)->Entity, NULL, 0, 0); it crashes even when I put the ent_setmesh(p_Block->Entity, newMesh, 0, 0); at the top instead.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1