Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Lars W.

OpenGL OpenGL and DirectX

This topic is 6692 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I am converting my Programm from DirectX to OpenGL, so that it can be used under NT and other Systems without the newest DX Drivers. But i wan''t that the can be run with one Programm. The Problem is, if i run a Programm which is linked with some of the Directx Librarys, like ddraw.dll, i can''t run it under NT cause of the incomplete DLLs. When i dont use the iDrictDrawObject or the IDirect3DObject i don''t need the Librarys, and it runs under NT. But without those Objects, i can''t initialize Direct3D. Does anybody of you know how to solve this. I think it is done with dynamically loading the dlls, but i never did that, and it sounds quite complicated. So that learning it in the next 3 Days falls away (or isn''t it that complicated). I would be Happy for any response. Lars

Share this post


Link to post
Share on other sites
Advertisement
im at a bit of a loss here, u wanna convert a program to opengl so u can run it under NT cause NT only got directx3 which doesn''t run d3d. OK then u say u wanna inialize d3d. haven''t u just answered your own question.

Share this post


Link to post
Share on other sites
I wan''t a programm, that is capable of doing OpenGL AND Direct3D, so you can choose after starting the Programm which API to use. And that under NT you are forced to use GL.

Lars

Share this post


Link to post
Share on other sites
Windows NT can use DirectX but only older COM object. My adwise to you: Use Direct3D but use ony d3d/ddraw object that was made before DirectX 3.0 if the user have NT.

Zeblar Nagrim, Lord of Chaos

Share this post


Link to post
Share on other sites
Is it possible to get the newer interfaces from the old ones by quering them ?
Cause i want to use the Directx7 Features, when the Program is not run under NT.

Lars

Share this post


Link to post
Share on other sites
Yes it is possible, here is a example how to query for dd7:

            
// Query the DirectDraw driver

LPDIRECTDRAW pDD;

if( FAILED( pDD->QueryInterface( IID_IDirectDraw7, (VOID**)&g_pDD ) ) )
{
SHOW("Can't query IDirectDraw7!");
pDD->Release();
}
pDD->Release();


Zeblar Nagrim, Lord of Chaos

Edited by - Zeblar Nagrim on July 14, 2000 5:47:42 AM

Share this post


Link to post
Share on other sites
Thanks, i will try that at the university tomorrow.

But i have the Bad feeling, that it does not work, because of the
IID_IDirectDraw7 GUID, which is specified in the dxguid.lib(Version 7).
Another Problem could be that i have to link with the ddraw.lib, and this thingi is still Version 7.0, or could i compile with an old ddraw.lib ?

Lars

Share this post


Link to post
Share on other sites
So i had some problems the last days, but i tried with getting the DirectDrawObject from the older one, but there is still the Problem with the ddraw.dll.
The Error in Detail, right after execution, before any execution of one of my functions.

The Prcedureentrancepoint "D3DParseUnknownCommand" could not be found in Dynamic Link Library "DDRAW.dll"

(Has been translated from german)

Does anybody know how to solve this Problem (without genertating two different Versions) ?

Lars

Share this post


Link to post
Share on other sites
Where you compiler the program??. In nt or (win9x + dx7)??

BeCause, i think dx7 version on nt will fail only when call procedure from ddraw.dll, but if you avoid to call this procedure this not have to fail even, if in the program have to call to this procedure.


Share this post


Link to post
Share on other sites
It sounds like what you want to do is not link with the ddraw.lib but instead dynamically load the ddraw.dll when you need it, and then query for the DX7 interface. If the query for the interface fails then use OpenGL. I''m not sure if you acutally have to use LoadLibrary instead of statically linking, but if you are having problems with just running the program then you probably will. Sorry that I don''t have any code examples, but I hope that this helps.

Zak

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!