2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: different renderer?
[Re: lostclimate]
#94026
10/13/06 22:44
10/13/06 22:44
|
Joined: Jan 2006
Posts: 1,829 Neustadt, Germany
TWO
Serious User
|
Serious User
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: jcl]
#94028
10/16/06 14:32
10/16/06 14:32
|
Joined: Oct 2005
Posts: 4,771 Bay City, MI
lostclimate
OP
Expert
|
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]
#94031
10/25/06 15:08
10/25/06 15:08
|
Joined: Oct 2005
Posts: 4,771 Bay City, MI
lostclimate
OP
Expert
|
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?
|
|
|
|