Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,086 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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

Chief Engineer
jcl  Offline

Chief Engineer

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

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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