PDA

View Full Version : DX and OpenGL Components



wolff
01-30-2006, 02:32 PM
Hi!

Its possible a Opengl using GLUT aplication have a DirectX component Co-exist in the same Rendering context?

humm...let me be more especific...

I have my engine with BSP , Sky Box and all rendering objects implemented in OpenGL, but im trying now develop the code for my characters, and them im blowing up whith that problem:

The only file format i found who get a suitable support for bones animation i found is a .x format (microsoft), where i found a lot of routines for character animation.

I develop the Loading and perform the animations and all work well...but i cant put it on my engine becouse everything implemented on the rest of rendering objects are in OpenGL.

There is some way to Use The rendering functions of DirectX and OpenGL on the same aplication, like a glut program for example?

Thanks and regards.

SirKnight
01-30-2006, 04:26 PM
No, you can't use D3D (or DDraw) and OpenGL at the same time. At least they won't interact with each other like you want. You can use OpenGL and the other components of DirectX like DirectSound, DirectInput, etc at the same time, just not the graphics components.

You'll just have to come up with your own .x format loading code if you wish to use .x.

-SirKnight

Humus
01-30-2006, 04:33 PM
You can use DirectX and OpenGL on separate windows within the same app, but you can't use DX to draw some stuff and GL some other in the same window.

What you can do is simply create a separate app that uses the D3DX stuff to load a .x file. Then grab the data and save to your own file in whatever format you like. Then you can use that file in your GL app.

wolff
01-30-2006, 04:34 PM
Thanks a Lot!

Regards.

V-man
01-30-2006, 07:23 PM
The only file format i found who get a suitable support for bones animation i found is a .x format (microsoft), where i found a lot of routines for character animation. Look into milkshape. It's a modern format and there is code and tutorials on the web.
It can be written in ASCII format if you prefer.
http://www.swissquake.ch/chumbalum-soft/index.html

tamlin
01-30-2006, 08:55 PM
Originally posted by Humus:
You can use DirectX and OpenGL on separate windows within the same appIf you're lucky, and depending on definition "use".

I've tried this on an ATI card, and I got some rather... interesting results. It seemed to me as the depth buffer was shared between the two windows, and the hyper-z's 4x4 pixels level made the DX window not draw some parts as intended.

Zulfiqar Malik
01-30-2006, 09:36 PM
The doom3 md5 file format supports joint based animation. There is a good public documentation of the format (its a plain text format so you shouldn't have much problems understanding it yourself). There are public exporters for Maya and Max and if your app is non-commercial and you happen to have a copy of doom3 lying around then you can use the game to convert maya files to md5.
Check out the forums at doom3world (http://www.doom3world.org) .