Mogre and DirectX/OpenGL together

boyamer

22-04-2009 08:16:29

Is there any way to retriveve native Direct3D device into Mogre?
and then use it to render native stuff?

like in this topic: http://www.ogre3d.org/forums/viewtopic. ... 6f4e2718c6

thanks

Bekas

22-04-2009 17:19:31

Check this out:
http://www.ogre3d.org/docs/api/html/classOgre_1_1RenderTarget.html#6c32524efacf6da599d5daccf3d9e166
Pass "D3DDEVICE" to this function for D3D, and "GLCONTEXT" for GL.

feanor91

22-04-2009 17:31:54

Check this out:
http://www.ogre3d.org/docs/api/html/classOgre_1_1RenderTarget.html#6c32524efacf6da599d5daccf3d9e166
Pass "D3DDEVICE" to this function for D3D, and "GLCONTEXT" for GL.


Well thanks a lot...Meanwhile, is this any more example, because the api definition is all but not extensive in explanation.....

(Things todo : a REAL doc on ogre with examples!)

boyamer

22-04-2009 20:22:53

could you post any example please?

I can understand how to retrieve the device and then use it

thanks

Bekas

22-04-2009 23:26:18

When you have created your RenderWindow you can do
IntPtr device;
renderWindow.GetCustomAttribute("D3DDEVICE", out device);

To get the D3D device.

This is how to retrieve the device, but on how to use it you should refer to specific documentation (Managed DirectX, SlimDX, etc.).