Jump to content
  • Advertisement

Archived

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

Buzz1982

if a 3D engine supports OGL or D3D, does it means it is written in these APIs?

This topic is 5444 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 have seen on the net that many free 3D game and graphics engines says that they support opengl or direct 3D. What do they mean by that. aren''t these engines written in these libraries. the word "support" is confusing.what i understand is that they mean that the engine uses software renderer however it can make use of 3D hardware also.am i right or there is something wrong. please correct me if im wrong. thanx alot

Share this post


Link to post
Share on other sites
Advertisement
Hi,

What it usually means, is that the engine is written for both
of the API''s.

Meaning, in a simple way, that it comes in 2 flavors,
Direct3D and OpenGL.

This is often done cause one API will work better on some systems
then the other one will.

Share this post


Link to post
Share on other sites
Usually, it means that it''s got a modular rendering engine. Essentially, the application just calls functions like "LoadObjects()", "Render()", etc., and the implementation is handled by individual .dll files, each of which handles the actual implementation of the particular function in the best way possible for that particular API.

The best example that I can think of for this would have to be the original Unreal. The game made use of a Direct3D renderer, an OpenGL renderer, a Glide renderer, and a software renderer.

Share this post


Link to post
Share on other sites
u mean unreal made use of all the three ogl,d3d,glide in a single game. how can we use both d3d and ogl in a single application(on a single rendering context)?

Share this post


Link to post
Share on other sites
If i understand what you mean by ''rendering context'' correctly, then you cannot share it between ogl and d3d. Make code paths around this.

Share this post


Link to post
Share on other sites
I think I understand what your asking, so heres an example. In half life if you go to the video option menu you can pick D3D or OGL, So the code executes a code path depending on whats picked. For example

if(choice == D3D)
API = D3D;
else
if(choice == OGL)
API = OGL;
if(API == OGL)
use OGL.DLL
else
use D3D.dll


thats not very good pseudo code, but im tired so hopefully you get my drift.

Depending on what you chose the progam will execute a different code path(or use a certain DLL).

Share this post


Link to post
Share on other sites
Yes.
To the point of creating a rendering context (or a Direct3d device in d3d), you should use different tactics to render.

Share this post


Link to post
Share on other sites
The examples given in this string of tutorials seems to be right up the OP''s alley:

http://www.gamedev.net/reference/programming/features/rendererdll1/
http://www.gamedev.net/reference/programming/features/rendererdll2/
http://www.gamedev.net/reference/programming/features/rendererdll3/

They''re right there on the front page. Granted, the system presented here isn''t the best (far from it) it DOES show an example of creating said modular interface... sort of.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Buzz1982
u mean unreal made use of all the three ogl,d3d,glide in a single game. how can we use both d3d and ogl in a single application(on a single rendering context)?
The use of these libraries is not concurrent. One of the APIs is chosen upon startup and the others are ignored for that instance.

Not all consumer video cards supported OpenGL back then, so a choice between Glide, OpenGL and Direct3D allowed for the widest support of the PC platform. There''s little reason to do that these days unless some of your target platforms lack support for your primary choice of API.

Share this post


Link to post
Share on other sites
simply put, it means that you can choose which one of the APIs you want to use. You cannot, however, use more than one at the same time.

where the hell you got software rendering from i dont know

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!