Thanks for the info V-man. I’ve seen these links before and they are no use to me. I’m not interested in .x format, only in mixing d3dx mesh calls with Opengl drawingcalls. The programs above all parse .x files into a unique mesh format. I wish to use DX meshes.
To be more precise, I wish to define an array in memory directly corresponding to vertices in a d3d mesh, make repeated calls to D3dx routines then read out the mesh and display using opengl.
You can imagine that my arrays will be generated algorithmically, so .x format is no use to me.
However, thanks for taking the time to post the links. I suspect its a matter of trying it…
A problem with many D3DX calls are that they take a D3D device as a parameter. If you want to do stuff at runtime for an OpenGL app that could be a problem. But there’s nothing preventing you from preprocessing stuff with D3DX in a separate app and writing out the results to your own files which you load in GL app.
OK to close this discussion down, I have succeeded. I now have a trivial example of an OGL window with a D3D torus mesh displayed using Opengl calls.
Humus, I solved the issue you mention by using the same HWND to initialise D3D and Opengl device/context, but of course never opening a D3D window means it doesnt bug out.
So there you go it is possible to use the d3dx mesh routines (such as precomputed radiance transfer and N patches) and render using OpenGL.