Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, juanex, Grant), 1,018 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
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: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
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: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
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 | chip programmers | 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