| 6 posts found | |||
|---|---|---|---|
|
ive wonderd if you could use directX and openGL in the same program
|
|||
|
2/27/08 9:49:48 PM#2
right now I'm looking at openGL(through LWJGL). over an applet. |
|||
|
3/05/08 11:03:53 AM#3
As far as I know, you can use DirectX and OpenGL in the same program, and allow the user to select which he prefers. You might even be able to use them at the same time, but that seems like a bad idea. |
|||
|
3/06/08 11:45:47 AM#4
The game engine I use allows open GL and DirectX. It's already an predefined option default in the engine. We can disable that fo course, but why when we can give the players the choice. |
|||
|
3/06/08 11:53:06 AM#5
Its usually easier to handle writing an engine in One or the Other but you can definitly give the user the option of which one to use. Doing this means you have to code every little peice of graphics api function & shader (more like you have to program the shaders twice if they use any api specific keywords) to work for both. Its why you don't see alot of companies do it but far more of them are starting to if they use a 3rd party engine. When you code for both its double the work & double the testing and sometimes double the errors. You can not run OpenGL & DirectX at the same time for the same features...meaning if your rendering the program using OpenGL you can not load up Direct X to do any sort of graphics rendering or shaders, but you can load up Direct input or Direct Sound / Music (which every one is their main sound input these days). It is techincally impossible to run OpenGL & Direct X for graphics at the same time because of the Window & Device Contexts. When a program starts those two are created according to the API you select it to use. I suppose one could try but the level of indirection for the window would be crazy. Please Refer to Doom Cat with all conspiracies & evil corporation complaints. He'll give you the simple explination of..WE"RE ALL DOOMED! |
|||
|
3/12/08 6:23:08 PM#6
to explain metaphorically it would be like deciding tool to use in your right hand. You could chop the tree with the axe(directX) or the chainsaw(openGL). Then once your tell your arm to chop, it will do what the tool requires, each handles differently but they both accomplish the same result.. as well it it fairly obvious why you cant weild both in one hand.
|
|||