OpenGL vs. Direct3D
OpenGL vs. Direct3D
OpenGL vs. Direct3D
Open-source software is software whose source code is published and made available to the public, enabling anyone to copy, modify and redistribute the source code without paying royal ties or fees. Open source code can evolve through community cooperation. What is OpenGL? In 1982, Silicon Graphics started selling high-performance graphics terminals using a proprietary API called Iris GL (GL is short for "graphics library"). OpenGL is a non-profit open standard created to allow users on any platform to experience the highest quality graphics that their hardware can provide. OpenGL is a specification implemented in the C language, though it can use other programming languages. It is built on the concept of a state machine, though more recent OpenGL versions have transformed it into much more of an object-based system. As an API, OpenGL depends on no particular language feature, and can be made callable from almost any programming language with the proper bindings. Such bindings exist for Ada, BASIC (BlitzMax (often used to program games), PureBasic, and Visual Basic), C#, Delphi, FORTRAN, Haskell, Java, Lisp, Lua, Pascal, Perl, Python, and Ruby to name some. OpenGL is an open standard API that provides a number of functions to render 2D and 3Dgraphics, and is available on most modern operating systems including but not limited to Windows, Mac OS X and GNU/Linux. OpenGL (Open Graphics Library) is a standard specification defining a cross-language, crossplatform API for writing applications that produce 2D and 3D computer graphics.
What is DirectX [From Direct3D]? Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms.Originally, the names of these APIs all began with Direct, such as Direct3D DirectDraw DirectMusic DirectPlay DirectSound
and so forth. The name DirectX was coined as shorthand term for all of these APIs (the X standing in for the particular API names) and soon became the name of the collection. Direct3D (the 3D graphics API within DirectX) is widely used in the development of video games for Microsoft.
Lawla10do
The developer must manage hardware resources independently; however, the implementation is simpler, and developers have the flexibility to al locate resources in the most efficient way possible for their application. Hardware and software makers generally respond rapidly to changes in DirectX, e.g. pixel processor and shader requirements in DirectX 9 to stream processors in DirectX 10, while new features in OpenGL are mainly implemented first by vendors and afterward retroactively applied to the standard. Some former critics of Direct3D acknowledge that now Direct3D is as good if not better than OpenGL in terms of abilities and ease of use. It is part of Microsoft's DirectX application programming interface (API). Direct3D is a proprietary API that provides functions to render three dimensional graphics, and uses hardware acceleration if it is available on the graphics card. It was designed by Microsoft Corporation for use on the Windows platform. Prior to DirectX, Microsoft had included OpenGL on their Windows NT platform. At the time, OpenGL required "high-end" hardware and was focused on engineering and CAD uses.Direct3D was intended to be a lightweight partner to OpenGL, focused on game use. As 3D gaming grew, OpenGL evolved to include better support for programming techniques for interactive multimedia applications like games, giving developers choice between using OpenGL or Direct3D as the 3D graphics API for their applications. Direct3D 11 runs on Windows Vista and Windows 7. It will run on future Windows operating systems as well.
Why we should use OpenGL and not DirectX (From Direct 3D) WHY? Answer: OpenGL is cross-platform Given that OpenGL has less vendor support, is no longer used in games!!!...??? Is being actively attacked by Microsoft, and has no marketing strength, why should we still use it? Wouldn't it be more profitable to ditch it and use DirectX like everyone else? No, because in reality, OpenGL is more powerful than DirectX, supports more platforms, and is essential for the future of games. Often, when we meet other game developers and say that we use OpenGL for our game Overgrowth, we're met with stares of disbelief -- why would anyone use OpenGL? DirectX is the future. Direct3D and OpenGL are competing application programming interfaces (APIs) which can be used in applications to render 2D and 3D computer graphics, taking advantage of hardware acceleration when available.
Performance: Shortly after the establishment of Direct3D and OpenGL as viable graphics libraries (circa 1995), Microsoft and SGI engaged in what has been called the "API Wars. The consumer market was using software renderers implemented by Microsoft for both Direct3D and OpenGL.
Lawla10do
Software rendering by the 3D API was largely irrelevant for both Direct3D and OpenGL applications. Not many DirectX applications used Direct3D's software rendering, preferring to perform their own software rendering using DirectDraw's facilities to access the display hardware. OpenGL, originally designed for then-powerful SGI workstations, includes a number of features, like stereo rendering and the "imaging subset", that were generally considered of limited utility for games - although Stereoscopic gaming has drawn a lot more interest as of 2011. OpenGL gives you direct access to all new graphics features on all platforms, while DirectX only provides occasional snapshots of them on their newest versions of Windows.
OpenGL serves two main purposes, to: Hide complexities of interfacing with different 3D accelerators by presenting a single, uniform interface Hide differing capabilities of hardware platforms by requiring support of the full OpenGL feature set for all implementations (using software emulation if necessary).
OpenGL has historically been influential on the development of 3D accelerators, promoting a base level of functionality that is now common in consumer-level hardware. Portability Direct3D is officially implemented only on Microsoft's Windows family of operating systems, including embedded versions used in the Xbox family of video game consoles and Sega's Dreamcast. Several mostly functional ports of the Direct3D API have been made by Wine, a project to port common Windows APIs to Unix-like operating systems. OpenGL has implementations available across many platforms including Microsoft Windows, Unix-based systems such as Mac OS X, GNU/Linux. OpenGL was chosen as the main graphics library for Android, iOS, and Symbian in the OpenGL ES form. Microsofts OpenGL driver provides hardware acceleration in Windows Vista; support was dropped in Windows XP. OpenGL has always seen more use in the professional graphics market than DirectX, while DirectX is used mostly for computer games. At one point many professional graphics cards only supported OpenGL, now virtually all professional cards which work on the Windows platform will also support Direct3D.
Comparison In general, Direct3D is designed to virtualize 3D hardware interfaces. Direct3D frees the game programmer from accommodating the graphics hardware. OpenGL, on the other hand, is designed to be a 3D hardware accelerated rendering system that may be emulated in software. These two APIs are fundamentally designed under two separate modes of thought.As such; there are functional differences in how the two APIs work.
Lawla10do
Direct3D expects the application to manage hardware resources. OpenGL makes the implementation do it. This tradeoff for OpenGL decreases difficulty in developing for the API, while at the same time increasing the complexity of creating an implementation (or driver) that performs well with Direct3D.
Availability Direct3D application development generally targets the Microsoft Windows platform. The OpenGL API is available under an open source license, and implementations exist for a wide variety of platforms. Platform Mobile Platforms License Direct3D Microsoft Windows Direct3D Mobile Proprietary OpenGL Cross-platform OpenGL for Embedded Systems (OpenGL ES) Open source or trademark
In more detail, the two computer graphics APIs are: OpenGL and Direct3D are both implemented in the display driver. The following compares the two APIs, structured around various considerations mostly relevant to game development. Mobile phones and other embedded devices OpenGL ES Direct3D Mobile
OpenGL for Embedded Systems (also known as OpenGL ES) is a subset of the OpenGL 3D graphics API designed for embedded devices. Various versions of smartphone operating systems support OpenGL ES, such as Android, iOS (iPad, iPhone, iPod Touch), Maemo (Nokia N900), and Symbian. Direct3D Mobile, a derivative from Direct3D , is supported by Windows CE.Currently al l Windows Phone7 devices use a .NET Framework UI accelerated by Direct3D Mobile 9 on Adreno 200 integrated GPUs by Qualcomm.
Lawla10do