• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
3Ddreamer

OpenGL vs DirectX

15 posts in this topic

Hi, everyone [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]


The reason why I am opening this discussion is because the information about these issues is so spread and muddled with opinions. My goal is to more centralize the subject of OpenGL and DirectX for convenience. Also given the blistering fast pace of both OpenGL and DirectX changes in games, I want the latest perspectives.

Both OpenGL and DirectX API based games and simulations, some switchable to either by the user, have been enjoyed and modded by me. Also a given is that both seem to be quite powerful and full featured, advantages and disadvantages for both.

Is OpenGL going to involve more advanced work for the game developer, yet greater flexibility in the long term? Doesn't the hardware accelerated 3D nature of OpenGL offer more potential for game features because software processing could be run simultaneously with hardware acceleration to broaden the game engine base - so to speak? Isn't hardware acceleration offering the most potential for game performance and more 3D objects and 2D textures allowable?


Clinton
-2

Share this post


Link to post
Share on other sites
Well, here is an example of the kind of contradiction that I read: Sources are publishing that DirectX is more software involved than hardware accellerated compared to OpenGL, but some such as yourself are not making the distinction, with all respect.


Clinton
0

Share this post


Link to post
Share on other sites
And which sources would that be exactly?

You might be confusing some concepts here. When a graphics card does not support some features of the D3D API in hardware a so-called 'Reference Device' can be used by developers which emulates those features in software mostly for debugging purposes as a DX SDK installation is needed.
I believe a software renderer can also be used by D3D if you provide one, but it generally isn't recommended.

In normal situations Direct3D is a library for doing hardware accelerated rendering.
1

Share this post


Link to post
Share on other sites
Okay, but isn't OpenGL more low level programming compared to DirectX? Isn't DirectX more friendly to scripting languages?


Clinton
0

Share this post


Link to post
Share on other sites
It sounds that you perceive these APIs as completely different beasts. Actually, these are very, very similar. In the end both need to access the gfx card drivers that do the real work. There are differences, but these can be named best as "slightly". DX is considered slightly faster, slightly harder to learn, has slightly less problems with outdated drivers (and all of these points are contested by numerous people, so even at these you won't get a 100% agreement). I again stress the word "slightly". In the end it's mostly about convenience and personal taste of the coder...

The only big difference I can think of is that OpenGL is extremely crossplatform while DX is tied to MS platforms.
1

Share this post


Link to post
Share on other sites
[quote name='3Ddreamer' timestamp='1348110774' post='4981900']
Well, here is an example of the kind of contradiction that I read: Sources are publishing that DirectX is more software involved than hardware accellerated compared to OpenGL, but some such as yourself are not making the distinction, with all respect.


Clinton
[/quote]

Direct3D has a larger official support library(D3DX) Which is software only ofcourse but the hardware accelerated features are pretty much equivalent. (OpenGL doesn't have any official software support library anymore, (glu and glaux are software support libraries for OpenGL but both are deprecated and horribly out of date) There are tons of third party support libraries to choose from though if you want and Microsoft is deprecating most of its support library for DX with Windows 8, (Pretty much noone uses it for professional games anyway and since the two APIs have become so similar most of the third party support libraries work just fine with both APIs)
1

Share this post


Link to post
Share on other sites
[quote name='SimonForsman' timestamp='1348138996' post='4981986']
glu and glaux are software support libraries for OpenGL but both are deprecated and horribly out of date.
[/quote]
Yeah, that's true, and sure they're not officially supported but freeglut and glee are nice extensions.
I use them both everyday, and they're updated quite often...
2

Share this post


Link to post
Share on other sites
[quote name='Hodgman' timestamp='1348148678' post='4982018']
So a "cross platform" renderer has to maintain and test code for:
Consoles: GX + GCM + "D3D360" + any other consoles
Mac: GL2 + GL3 + GL4
Linux: GL2 + GL3 + GL4 multiplied with ATI + nVidia + Intel
Windows plan A: GL2 + GL3 + GL4 multiplied with ATI + nVidia + Intel
Windows plan B: D3D9, D3D11_10, D3D11
Mobile Phone: GLES1 + GLES2 multiplied with each Android + iOS device

Yes, sharing common GL code paths might be able to save you some time, but no matter which APIs you use, it's going to be a hell of a lot of work.
[/quote]

When did Apple add OpenGL4 support ? (Last time i checked they had just added OpenGL 3.2 in Lion and i don't think Mountain Lion added anything new in that area). (Apples tight grip might keep things consistent but they do lag behind quite a bit when it comes to supporting new features)
2

Share this post


Link to post
Share on other sites
Neither are bad and both have matured well enough, appropriately and look to be continuing to do that. If the platforms you're targeting don't force the decision somewhat, then I'd look into both and make a personal decision based on preference. I'd also say that if you have the time, consider doing both anyway...your own software architecture will be much stronger when based on concepts supportive of both targets.

So...find a reason to rule one or the other out (such as platforms) and make the decision easy for yourself if possible, if that's not an option try both and make a personal decision and if you can afford the time and effort, do both, or at least do one in full and keep your hand in the other anyway.

Either way, never say never. I did that and was never a fan of Mac's, so if five years ago someone was to suggest to me that I'd have spent last year on Open GL ES doing mobile and this year on Open GL 3.2 and Mac, I'd have thought they were on crack yet it's been surprisingly good fun. The Mac is a fairly decent platform for OpenGL development actually.

Direct3D or OpenGL...you'll have good fun on either or both paths regardless. Edited by freakchild
2

Share this post


Link to post
Share on other sites
They both work, they're both good, they're both fun to use, so choose either but in the longer term aim to learn both.

[quote name='3Ddreamer' timestamp='1348109369' post='4981895']
Doesn't the hardware accelerated 3D nature of OpenGL offer more potential for game features because software processing could be run simultaneously with hardware acceleration to broaden the game engine base - so to speak? Isn't hardware acceleration offering the most potential for game performance and more 3D objects and 2D textures allowable?
[/quote]
[quote name='3Ddreamer' timestamp='1348112191' post='4981908']
Okay, but isn't OpenGL more low level programming compared to DirectX? Isn't DirectX more friendly to scripting languages?
[/quote]

You seem to have some very suspect sources here. As pointed out above, both are hardware accelerated, and both are very low-level (OpenGL is actually a little higher-level than D3D as it abstracts some hardware concepts a little more; I suspect that whatever sources you're using may not have updated their info since sometime around 1996 or 97...)
2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0