Answer the question
In order to leave comments, you need to log in
OpenGL or DirectX?
I am a beginner gamedev. I know SFML quite well. I know c++. And so I was drawn to 3D games. Started thinking: OpenGL or DirectX. As a result, I recently began to study DirectX, but I am also interested in OpenGL. Please describe the pros and cons, and what would be better for creating games / engines.
Answer the question
In order to leave comments, you need to log in
Depends on your current knowledge and wishes, especially on how ready you are to deal with each of their technologies.
OpenGL is a cross-platform API, before it was not very convenient to start working with it on Windows, now various libraries are available (GLEW, GLFW) and this is no longer a problem.
DirectX will probably give you more options, but there's a lot of tinkering with Windows-specific stuff. DirectX works through COM technology. At first it will be strange.
If I were you, I would start with OpenGL and look at Vulkan. Knowledge of OpenGL is also useful because it will be easier to use related APIs, such as WebGL, if you want to write in-browser code.
OpenGL and DirectX cannot be compared, since the first is only for graphics, and the second is for everything (Direct3D for graphics)
OpenGL
+ cross-platform (desktop, mobile, web)
- to work with sound, input, network, you need to look for the appropriate tools. May affect
DirectX development time
- Windows only, xBox, etc.
+ all tools in one form, ready to take and use
As for me, creating engines in our time is an expensive and unjustified business, since there are many ready-made options. Among them, many support D3D + OpenGL, many only OpenGL. So in terms of platform coverage, OpenGL is better.
That is, you cannot definitely choose, you need to take into account which platforms you need and how you calculate the forces / time. It may be easier and more reliable to take UE4 or a similar engine. Last resort Urho3D
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question