• DirectX or OpenGL for C++ Game Programming ?
    23 replies, posted
I've been working on the console with C++, for a long time. And i believe i'm ready for the game programming. But i cant give a decide about which library that i have to use, DirectX or OpenGL ? Waiting your opinions. Any opinion would be much appreciated.
OpenGL if you want to make shit for [B]everything[/B] but the xbox360. DirectX if you want to make shit for [B]only[/B] windows and xbox360. So...OpenGL it is. EDIT: You're new? You shouldn't go to either of them. You should start simple with something like SDL or SFML, I would suggest [url=www.sfml-dev.org]SFML[/url](which uses OpenGL under the hood anyways)
[QUOTE=AtomiCasd;34768942]OpenGL if you want to make shit for [B]everything[/B] but the xbox360. DirectX if you want to make shit for [B]only[/B] windows and xbox360. So...OpenGL it is. EDIT: You're new? You shouldn't go to either of them. You should start simple with something like SDL or SFML, I would suggest [url=www.sfml-dev.org]SFML[/url](which uses OpenGL under the hood anyways)[/QUOTE] I dont wanna limit myself to 2 platforms. Probably i will choose OpenGL. But waiting other opinions too.
In my opinion. Both are a bit too advanced if you haven't done anything graphical before. Even if you did, it can be a bitch to work with. Start with a library that does stuff for you. After that, if you really want OpenGL or DirectX, DirectX is easier to work with since it's more than just a rendering library but at this point you shouldn't be looking for the easier way to do stuff. OpenGL, all the way.
I see you're coming from scripting for Garry's Mod. As Darwin said, rasterization libraries like OpenGL and DirectX are quite complicated to work with. Compared to the fancy drawing functions in Garry's Mod and LÖVE, it's the equivalent of assembly for graphics programming. If you're not going to do anything other than 2D sprite games, you should not consider the use of a bare bones rendering library, especially because you're new to the whole deal.
You shouldn't worry about cross-platform compatibility if you're just starting out. Far too often have I started projects with this as one of my goals, and ended up not completing it because I got bogged down writing everything twice.
Try a few out, find which one you like the best and stick with it. Once you're proficient in one they're all much of a muchness...
I would suggest starting out with SFML, and when you think you have a hold of that, start using OpenGL with it. Jumping straight from console to OpenGL is not a wise decision.
I have this problem too, I've worked with LOVE2D, some XNA and some SFML before. I want to move on to something else. I don't want to use java, so I'm sticking with C++, what is a good library to use? I'm considering opengl.
I for one, will recommend you jump right into OpenGL. It's a great library and as a learning experience, it is amazing to jump right into it. That's what I did and I regret nothing.
[QUOTE=Capsup;34780337]I for one, will recommend you jump right into OpenGL. It's a great library and as a learning experience, it is amazing to jump right into it. That's what I did and I regret nothing.[/QUOTE] Just wait until you find out how everything you ever knew about OpenGL is deprecated and you actually know nothing about how modern OpenGL works. Either that, or you're very smart/have lots of experience in similar stuff.
[QUOTE=Darwin226;34782548]Just wait until you find out how everything you ever knew about OpenGL is deprecated and you actually know nothing about how modern OpenGL works. Either that, or you're very smart/have lots of experience in similar stuff.[/QUOTE] It doesn't matter if it's depreciated, as long as it still works. And depending on his graphics card, it might not be depreciated. I'm still running OpenGL 2.1.
[QUOTE=The Kakistocrat;34783426]It doesn't matter if it's depreciated, as long as it still works. And depending on his graphics card, it might not be depreciated. I'm still running OpenGL 2.1.[/QUOTE] It does matter. A feature being deprecated means that it will get removed later. OpenGL has been delaying removing fixed pipelines for years now, Direct3D removed them in version 10. If you go and learn them now, you'll end up with knowledge that will be useless pretty soon and make learning the proper way harder.
What makes people think that they have to learn the deprecated stuff? There [I]are[/I] resources available for learning about the programmable pipeline as well, just as there are for Direct3D.
[QUOTE=raBBish;34783654]It does matter. A feature being deprecated means that it will get removed later. OpenGL has been delaying removing fixed pipelines for years now, Direct3D removed them in version 10. If you go and learn them now, you'll end up with knowledge that will be useless pretty soon and make learning the proper way harder.[/QUOTE] Not to mention that if you are usig OpenGL, chances are that you are trying to get more performance than with using some other library. OpenGL in immediate mode is MUCH slower than modern OpenGL. [editline]20th February 2012[/editline] [QUOTE=dvondrake;34783334]Who cares if something's deprecated? If it works, use it. Then you can gradually learn the new stuff as you go.[/QUOTE] The thing is, learning deprecated OpenGL will not help you learn modern OpenGL. They are vastly different.
[QUOTE=Darwin226;34783716]The thing is, learning deprecated OpenGL will not help you learn modern OpenGL. They are vastly different.[/QUOTE] I would even dare say that going from deprecated code to modern code is as big of switch as going from OpenGL to Direct3D.
If your game / program is well designed then the choice you make between new OpenGL, deprecated OpenGL (which is the only wrong choice) & DirectX will have no effect on your program because it will be hidden behind a layer which abstracts it away. Of course you should always choose OpenGL because it's easier to go cross platform.
[QUOTE=raBBish;34783654]It does matter. A feature being deprecated means that it will get removed later. OpenGL has been delaying removing fixed pipelines for years now, Direct3D removed them in version 10. If you go and learn them now, you'll end up with knowledge that will be useless pretty soon and make learning the proper way harder.[/QUOTE] hmm, then maybe I should learn the New OpenGL. GLSL is the non-depreciated part, right?
[QUOTE=The Kakistocrat;34787600]hmm, then maybe I should learn the New OpenGL. GLSL is the non-depreciated part, right?[/QUOTE] The programmable pipeline is the non-deprecated part. You can't use immediate mode for drawing, nor can you use any of the built-in functions for matrix operations, and you have to write shaders to tell the card what to do. Basically, don't use anything that isn't available in [url=http://www.opengl.org/sdk/docs/man3/]OpenGL 3.x[/url] There's enough overlap between 2.x and 3.x that you can write OpenGL code that works on old cards, but is still modern.
[QUOTE=ROBO_DONUT;34787655]The programmable pipeline is the non-deprecated part. You can't use immediate mode for drawing, nor can you use any of the built-in functions for matrix operations, and you have to write shaders to tell the card what to do. Basically, don't use anything that isn't available in [url=http://www.opengl.org/sdk/docs/man3/]OpenGL 3.x[/url] There's enough overlap between 2.x and 3.x that you can write OpenGL code that works on old cards, but is still modern.[/QUOTE] good, because my code has to run on 2.1.
[QUOTE=ROBO_DONUT;34787655]The programmable pipeline is the non-deprecated part. You can't use immediate mode for drawing, nor can you use any of the built-in functions for matrix operations, and you have to write shaders to tell the card what to do. Basically, don't use anything that isn't available in [url=http://www.opengl.org/sdk/docs/man3/]OpenGL 3.x[/url] There's enough overlap between 2.x and 3.x that you can write OpenGL code that works on old cards, but is still modern.[/QUOTE] Then it sucks that the netbook I'm working from only has support for 1.4 :(
Sorry, you need to Log In to post a reply to this thread.