Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixing DirectX and OpenGL

I want to be able to render into an OpenGL render window using DirectX. This is because the features i'm after are only supported in DirectX.

I have heard it is possible to do this a few years ago and i'm hoping it should still be possible.

I'd imagine it will involve pointing DirectX to the correct part of VRAM and the correct depth buffer.

Also a tutorial or simply an explanation would be extremely useful.

like image 256
ceorron Avatar asked Oct 07 '11 11:10

ceorron


2 Answers

At least NVIDIA has the NV_DX_interop extension, which let's you use Direct3D 9 buffers/textures/surfaces directly as OpenGL buffers/textures/renderbuffers (therefore being the other way around). But I don't have any experience with this and I don't know if it is widely supported or actually works any good.

It would be more interresting which features you think are only available in Direct3D. Maybe we can show you how to achieve it with OpenGL, as there are not many features (if any) that are available in Direct3D and not in OpenGL. Although if you got an ATI card, being available and actually working correctly may sometimes be two seperate things.

like image 108
Christian Rau Avatar answered Sep 26 '22 20:09

Christian Rau


Mixing OpenGL and Direct3D will not work, and AFAIK it never used to. May I ask, which features of Direct3D you require, that OpenGL doesn't offer?

like image 21
datenwolf Avatar answered Sep 24 '22 20:09

datenwolf