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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 1,151 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: different renderer? [Re: TWO] #94022
10/12/06 15:07
10/12/06 15:07
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yep. The material must contain an effect, otherwise the event is not called. The content of the effect does not matter, but it must be there.

Quote:

enable_render
If this flag is set, the material's event function is executed at the beginning of every entity rendering, if the material contains an effect and was assigned to the entity. This can be used to perform effect calculations based on entity skills or the entity's world matrix.


.

Re: different renderer? [Re: jcl] #94023
10/12/06 19:06
10/12/06 19:06
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
what do you mean by effect?

Re: different renderer? [Re: lostclimate] #94024
10/12/06 22:30
10/12/06 22:30
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
it needs a "do something"

Re: different renderer? [Re: FBL] #94025
10/13/06 03:28
10/13/06 03:28
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
have you got anything working yet bloodline, because if you do pm me, because maybe you can give me a nudge in the right direction.

Re: different renderer? [Re: lostclimate] #94026
10/13/06 22:44
10/13/06 22:44
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Code:

DLLFUNC int ERender_Eentity()
{
// Get all data
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;

struct VERTICES{float x, y, z, w;};
VERTICES v[2];
v[0].x = 100; v[0].y = 100; v[0].z = 0.0; v[0].w = 1.0;
v[1].x = 200; v[1].y = 100; v[1].z = 0.0; v[1].w = 1.0;
// open the scene and get the active D3D device
draw_begin();
if(!pd3dDevice) return 0;

pd3dDevice -> SetRenderState(D3DRS_LASTPIXEL, FALSE);
pd3dDevice -> SetRenderState(D3DRS_CLIPPING, FALSE);
pd3dDevice -> SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE);
// Render line on-screen
pd3dDevice -> SetFVF(D3DFVF_XYZW);
pd3dDevice -> DrawPrimitiveUP(D3DPT_LINELIST, 1, static_cast<LPVOID>(v), sizeof(VERTICES));

return 1;
}

DLLFUNC void ERender_Init()
{
ev->mat_model->event = reinterpret_cast<EVENT>(ERender_Eentity);
ev->mat_model->flags |= ENABLE_RENDER;
}



This pice does sth and returns 1. I tried it the Init and the Xerxes way, both failed. I know, it does work for 1000+ people, but I still donīt get it

p.s nope, lostclimate, but I didnīt looked long at it, my mum has b-day
pp.s two germans speaking english... interesting

Re: different renderer? [Re: TWO] #94027
10/16/06 09:19
10/16/06 09:19
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This still will not work because the effect is missing.

See the new C++ FAQ page -> http://manual.conitec.net/prog_faq.htm

Re: different renderer? [Re: jcl] #94028
10/16/06 14:32
10/16/06 14:32
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
wow, i searched and searched the manual, and i only wish i had the found that EXACTLY answers my question, lol.



EDIT: and even now... i still dont get it, it looks like the only way to do it is to use your own rendering effect, not to completely switch out renderers, wanted to just use irrlichts rendering device.

Last edited by lostclimate; 10/16/06 14:40.
Re: different renderer? [Re: lostclimate] #94029
10/25/06 13:36
10/25/06 13:36
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
anyone manage to get this even partially there yet?, im gonna try working on it again today

Re: different renderer? [Re: lostclimate] #94030
10/25/06 14:54
10/25/06 14:54
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
well so far i have got irrlicht to run in a 3dgs wrapper, not too much help, but at least i got the dll making/using concept down.

Re: different renderer? [Re: lostclimate] #94031
10/25/06 15:08
10/25/06 15:08
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
ENTITY* pEntity = (ENTITY*)ev->me;
BMAP* pSkin = (BMAP*)ev->render_map[0];
LPD3DXMESH pMesh = (LPD3DXMESH)ev->render_mesh;
LPD3DMATERIAL9 pMaterial = (LPD3DMATERIAL9)ev->render_d3dmaterial;
LPD3DXEFFECT pEffect = (LPD3DXEFFECT)ev->render_d3dxeffect;
IDirect3DDevice* pD3dDev = (IDirect3DDevice*)ev->pd3ddev;
Ogre_Render(pD3dDev,pMesh,pSkin,pMaterial,pEffect); // your own render function


what format are these returned in, like bmap, im gonna guess will return it in the type that you put in, but, irrlicht obviously doesnt support 3dgs meshes, so what does this all do?

Page 2 of 5 1 2 3 4 5

Moderated by  old_bill, Tobias 

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