Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, dBc), 18,430 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ENABLE_RENDER and ENABLE_TREE #140205
07/09/07 11:23
07/09/07 11:23
Joined: Oct 2002
Posts: 254
UK, London
Dyc Offline OP
Member
Dyc  Offline OP
Member

Joined: Oct 2002
Posts: 254
UK, London
returning 1 from the event function doesn’t seem to cause the entity to not be rendered by the engine as the manual suggests it should.

Re: ENABLE_RENDER and ENABLE_TREE [Re: Dyc] #140206
07/09/07 11:27
07/09/07 11:27
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
I can not confirm this. Check your code.

Re: ENABLE_RENDER and ENABLE_TREE [Re: jcl] #140207
07/09/07 11:28
07/09/07 11:28
Joined: Oct 2002
Posts: 254
UK, London
Dyc Offline OP
Member
Dyc  Offline OP
Member

Joined: Oct 2002
Posts: 254
UK, London
Well do I need to return a var or int ?

Re: ENABLE_RENDER and ENABLE_TREE [Re: Dyc] #140208
07/09/07 11:29
07/09/07 11:29
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
A var.

Re: ENABLE_RENDER and ENABLE_TREE [Re: jcl] #140209
07/09/07 11:33
07/09/07 11:33
Joined: Oct 2002
Posts: 254
UK, London
Dyc Offline OP
Member
Dyc  Offline OP
Member

Joined: Oct 2002
Posts: 254
UK, London
Hmm have not tried it in wdl but in lite-c and using the plugin sdk it does not seem to work.

This is from the manual faq.

int Render_Entity(void)
{// Get pointers to all objects you need
ENTITY* pEntity = (ENTITY*)ev->me;
BMAP* pSkin = (BMAP*)ev->render_map[0];
LPD3DXMESH pMesh = (LPD3DXMESH)ev->render_mesh; D3DMATERIAL9* pMaterial = (D3DMATERIAL9*)ev->render_d3dmaterial;
LPD3DXEFFECT pEffect = (LPD3DXEFFECT)ev->render_d3dxeffect; IDirect3DDevice9* pd3dDevice = (IDirect3DDevice9*)ev->pd3ddev;// now render it
...
// tell the engine not to render the entity again
return 1;}

void Render_Init(void)
{
ev->mat_model->event = (EVENT)Render_Entity;
ev->mat_model->flags |= ENABLE_RENDER;
ev->mat_model->effect = "technique dummy { pass one { } }";
}



*EDIT
You were right, there was a problem with my entity effect.
Works now, Thanks

Last edited by Dyc; 07/09/07 12:08.
Re: ENABLE_RENDER and ENABLE_TREE [Re: Dyc] #140210
07/09/07 12:08
07/09/07 12:08
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Yes, this code is wrong. It must be a var. If you use an int, you can alternatively return 1024. I'll correct the FAQ.


Moderated by  HeelX, Spirit 

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