Starting Using OpenGL Or DirectX?

Started by
9 comments, last by frob 9 years ago

I'm little bit confused here

I think I know enough C++ and programming to start OpenGl or DirectX(I don't know what are they called).

Which one is better to start with?

Which books and refrences do you recommend for starting ?

+ how about XNA, how is it ?

Thanks.

Advertisement

This is an age old dilemma/debate asked by many people and you could've easily gotten your answer by googling. Here's two links that might help you,

http://www.cplusplus.com/forum/general/122457/

http://forum.devmaster.net/t/request-for-info-c-opengl-directx-more/7261

Both are graphics api, meaning that allow you to do 2d/3d graphics.

But there are various differences.

OpenGL has a (imo) more friendly naming convention, being a C style api with all methods starting with glSomething, while DirectX is a lot more ugly and confusing for the neofite.

BUT, with OpenGL you have to deal with driver differences and compatibility issues. You have to "cheat" using stuff like glew to access methods names, hoping that all the stuff you call actually exists at runtime.

DirectX is more reliable: it is installed or not.

BUT OpenGL runs on mac and linux and android and... DirectX is Microsoft only (PC, XBox...)

BUT DirectX manages also sounds and input, while OpenGL doesn't (graphics only).

I think you'd better try the raw basics of both. Put a textured triangle on the screen with both and then choose. You will probably swap between the two many other times.

Which should you learn? Are you wanting to restrict yourself to Windows for life? Probably not, so I'd say both.

As far as which you should learn first, that is a personal choice. They both do the same thing, but in different ways. Pick one to start, but learn both.

If you used the search you would have found like 100 threads about this on gamedev alone and each time it gets into an endless discussion, which boils down to:

- check which works on the platform you use now (and maybe later)

- if both, as they have both the mostly same functionality, look 1min at some tutorial websites to see which API calls look more ugly to you or just throw a coin

OpenGL in its current form is on its way out. OpenGL only makes sense if you want to work on mobile devices (specifically Android), Mac OS X, or Linux, but eventually you’re going to have to leave the kids’ toys behind and move onto Metal, Vulkan, or Direct3D 12.

Until then, Direct3D 11 most likely makes the most sense, as it will be much closer to the next API you will have to learn (and if you stay at it then you will have to learn another, and another).

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Thank, I've decided to start learning Direct X .

I'm now searching for resources and books,Anyone knows any resources and books for Direct X?

Thank, I've decided to start learning Direct X .

I'm now searching for resources and books,Anyone knows any resources and books for Direct X?

totally unstructured tutorials, but straight to the point:

http://braynzarsoft.net/index.php?p=DX11Lessons

totally structured tutorials, you'll end building a framework of classes, but I don't like the fact it uses d3dx math (deprecated) instead of xnamath. It give you a better organized vision of the whole thing, imo

http://www.rastertek.com/tutindex.html

I use both


but I don't like the fact it uses d3dx math (deprecated) instead of xnamath.

someone made a zip with ALL the tutorials rewritten for DirectXMath + DDSTextureLoader and I still have it on my HD somewhere if anyone is interested.

It's also a very good exercise to rewrite a couple of them yourself to get a good grasp of it.

Thank, I've decided to start learning Direct X .

I'm now searching for resources and books,Anyone knows any resources and books for Direct X?

totally unstructured tutorials, but straight to the point:

http://braynzarsoft.net/index.php?p=DX11Lessons

totally structured tutorials, you'll end building a framework of classes, but I don't like the fact it uses d3dx math (deprecated) instead of xnamath. It give you a better organized vision of the whole thing, imo

http://www.rastertek.com/tutindex.html

I use both

I learned all i needed to bootstrap my learning of DirectX 11 from the braynzarsoft tutorials in a matter of weeks.

A couple of weeks later i was gutting out all the D3DX stuff, and replacing it with DirectXTK and DirectXMath. It's worth doing yourself as a learning exercise, rather than finding a zip of the "fixed" version someone else has already written, as you learn a lot about how DirectX is structured in the process.

Also, don't rely on someone else to 'help you build an engine'. Take the raw building blocks from a tutorial and mess with them, tidy them up, break them and mould them, before you know it you'll know more than you ever expected.

Good luck!

This topic is closed to new replies.

Advertisement