Sign in to follow this  
Ex777

Should I switch to Open GL?

Recommended Posts

Hi, well I have been programming in Direct X for about a year now, I have about 2 or 3 books specific to direct 3D, and at this point, I dont think its for me. I really didnt want to switch to Open GL, because I'm a total fan of the way Direct X is object oriented, but I need something that is easier to program, understand, learn, and produce results, Direct X is just consuming to much time to understand, and produce results. I have absolutely 0 books on the subject of Open GL rendering, but have examined code, and it seems to be easier, to me atleast. So all of you reading this, do you think that I should switch to Open GL, or stick with Direct X. I don't care if Open GL, or Direct X is your absolute favorite thing, and you would gladly give up your first born to stay with it, I want an honest answer about what you think I should do.

Share this post


Link to post
Share on other sites
openGL isn't really any simpler than DirectX. In my experience the only really confusing part about the APIs comes about if you don't know how rendering works or if you don't know the ins and outs of Linear Algebra. i.e. it's not really the API that's confusing but it's the concepts of rendering itself that's the confusing part.

What in particular is confusing you about DirextX?

-me

Share this post


Link to post
Share on other sites
You should realize that DirectX != Direct3D. DirectX is the total package of objects and functions that will make your life easier. OpenGL can't be compared to DirectX, it compares to Direct3D. The difference between them is not that big. You can use Direct3D without DirectX, or you can OpenGL. Also keep in mind that OpenGL doesn't provide the ease of use that DirectX does. Loading meshes, fonts etc, you need to program yourself, while DirectX provides this functionality.

I myself use OpenGL, but expect it to be more work to get something complicated running then in DirectX. (I am still working on my mesh importer, while in DirectX importing .x files can be done in only a few lines of code).

Greetings.

Share this post


Link to post
Share on other sites
Quote:
Original post by Limitz
I myself use OpenGL, but expect it to be more work to get something complicated running then in DirectX. (I am still working on my mesh importer, while in DirectX importing .x files can be done in only a few lines of code).


I somewhat disagree, if you're using any other format other than .x, you still have to write an importer, COM initialization of D3D objects is IMO a lot more tedious than initializing an OpenGL context, and keeping track of whether you still have control over devices is something I much rather not have to worry about.

Share this post


Link to post
Share on other sites
Yeah, yeah, yeah, I know Direct X does not equal Direct 3D, and not to compare Direct X, to Open Gl, simple mistake, so my bad. I will learn the basics of Open GL, and see witch ones works better for me.

Edit:

@pali- No "specific" part of direct X is confusing me, its more or less, everything about the api, it just pisses me off some times, I dont know if you can understand this, but I hate having to constantly refer to a book, online tutorial, or other source code, to complete something extreamly simple, that I have already done in the past. Most of the time, its just one measily function, or object I forgot to use, or properly initialize, but still, anoying. Eh, sorry if that makes no sence, I have the concepts down (very down if u ask me :P ), but aperently you are right, I dont understand the underlying systems, or w/e very well.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Id say go with openGL, mainly because direct3d has become foo bar'd with the direct39.0 versions. Now differnt (monthly) versions have to be downloaded to the clients machine. I used 8.1 for a while and visited the most recent version 9.0 a couple of days ago and was totally not happy.

I downloading the latest 9.0 sdk from MS. Lets just say, that any tutorial off the web that is labeled for 9.0 does not work because of this stupid problem of having (I assume)the static/DLL correctly dated versions for D3DX (the original reason I never got aroudn to using 9.0). It defeats the whole purpose of the direct3d com architecture of being backwards compatable with previous versions.

Basic point is, I downloaded directx 9.0 SDK and I could not run random directx 9.0 apps that I found off teh web. This is BS in my opinion, and is enough reason to not use the API. (BTW: im a pretty die hard windows fan, but direct3d 9.0 just is not user friendly, which is the whole point of windows)

so yeah, move away from directx, because they are mutilating it. Maybe when 10 come out, but then, it probably isnt backwards compatable with half the card people will have.

So yeah, OpenGL all the way... wow, i thought Id never be saying that (not that theres anythign wrong with opengl). Because al the directX you learned, is no longer easily ran by your potential clients.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Id say go with openGL, mainly because direct3d has become foo bar'd with the direct39.0 versions. Now differnt (monthly) versions have to be downloaded to the clients machine. I used 8.1 for a while and visited the most recent version 9.0 a couple of days ago and was totally not happy.

I downloading the latest 9.0 sdk from MS. Lets just say, that any tutorial off the web that is labeled for 9.0 does not work because of this stupid problem of having (I assume)the static/DLL correctly dated versions for D3DX (the original reason I never got aroudn to using 9.0). It defeats the whole purpose of the direct3d com architecture of being backwards compatable with previous versions.

Basic point is, I downloaded directx 9.0 SDK and I could not run random directx 9.0 apps that I found off teh web. This is BS in my opinion, and is enough reason to not use the API. (BTW: im a pretty die hard windows fan, but direct3d 9.0 just is not user friendly, which is the whole point of windows)

so yeah, move away from directx, because they are mutilating it. Maybe when 10 come out, but then, it probably isnt backwards compatable with half the card people will have.


That has absolutely nothing to do with Direct3D. The DLL problem has to do with Direct3DX, which you don't have to use.

Quote:
Original post by Anonymous Poster
So yeah, OpenGL all the way... wow, i thought Id never be saying that (not that theres anythign wrong with opengl). Because al the directX you learned, is no longer easily ran by your potential clients.


That's wrong too, since the API comes with an installer which can easily be included in your download or installer.

Also, AFAIK the DLL problem is being handled in Direct3D10, but that's just heresay from a friend.

As to the OP, go with what the other's have said and find out which one you like/can use better.

Share this post


Link to post
Share on other sites
It sounds like you might benefit from switching to a renderering engine like Ogre that takes care of the low-level stuff for you. It would certainly be beneficial to master one of the APIs, but it isn't necessarily requisite to making cool games and stuff.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Because al the directX you learned, is no longer easily ran by your potential clients.


If your clients run Linux or OSX, then that may be true. But if they use windows then that's is bollocks.

Share this post


Link to post
Share on other sites
I think with DX 9 they're just playing around now, and trying to sell DX 10 to developers. DX 10 will probably be amazing, but that means we'll all have to upgrade to Vista :(

My personal reccomendation though: Learn both. Companies that develop for Windows will expect you to know D3D, but OpenGL allows you to program pretty much everything else AND can also be used for Windows.

One thing to note though: D3D has this weird thing about doing all the maths opposite to OGL. Why, I don't know, but since this is true I'd recommend learning one first, then go back to the other. Since you've started in DX, I'd stick with that for now.

Share this post


Link to post
Share on other sites
I think you should strive to more precisely identify why you and D3D are not getting along. It is likely that the problems are not related to D3D and are actually far more fundamental.

OpenGL lets you get by with less comprehension of what's going on than in D3D -- for a little while. But sooner or later (generally sooner) you have to come to grips with a lot of critical concepts, which are completely identical in OGL and D3D (occasionally with minor quirky differences that are irrelevant).

Quote:
COM initialization of D3D objects is IMO a lot more tedious than initializing an OpenGL context
That's bullshit. It actually takes more code to start up OGL than it does to start up D3D.

Share this post


Link to post
Share on other sites
the way i see it both are good opengl is my fav but youve purchased several directx books and begginning anything is always slow..when you get better yull have realised that everything comes together personally i think there both the just as good as the other,and overall i believe direct x has many more tutorials plus your books and it might be a little faster but im sticking with my ogl

d3d in my opinion ITS CRAP

but i said opinion and i know ill get flamed from about 4 or 5 members flaming me over this

Share this post


Link to post
Share on other sites
Quote:
Original post by firewall1
the way i see it both are good opengl is my fav but youve purchased several directx books and begginning anything is always slow..when you get better yull have realised that everything comes together personally i think there both the just as good as the other,and overall i believe direct x has many more tutorials plus your books and it might be a little faster but im sticking with my ogl

d3d in my opinion ITS CRAP

but i said opinion and i know ill get flamed from about 4 or 5 members flaming me over this


The only reason I'm saying anything is because "ITS CRAP" isn't an opinion, it's an insult. Why don't you try to atleast name a few reasons why it's crap (even if they're your opinion.) What exactly makes it 'crap'? In my opinion it has a nice structure, great support, and is pretty easy to use once you figure out how it works.

@OP: Another route is to write your own 3D renderer. No, I don't mean try to compete with DX or OpenGL, but if you wrote your own 3D renderer (on top of an existing 2D system like GDI) you'd learn how the transformation pipeline works as well as a good chunk of the required math. Also, I'm not recommending you write a 3D renderer for a game because writing a 3D renderer on top of GDI and such would be extremely slow.

Also, if you're going to be doing 2D games then there are other options like Allegro or SDL.

Also, if you think OpenGL is easier then try it for a couple days and find out if it really is.

Quote:
Original post by Promit
I think you should strive to more precisely identify why you and D3D are not getting along. It is likely that the problems are not related to D3D and are actually far more fundamental.

OpenGL lets you get by with less comprehension of what's going on than in D3D -- for a little while. But sooner or later (generally sooner) you have to come to grips with a lot of critical concepts, which are completely identical in OGL and D3D (occasionally with minor quirky differences that are irrelevant).

Quote:
COM initialization of D3D objects is IMO a lot more tedious than initializing an OpenGL context
That's bullshit. It actually takes more code to start up OGL than it does to start up D3D.


Promit is a genious. I couldn't have worded it better[smile].

Share this post


Link to post
Share on other sites
Smitty's proposition is a really good one -- if you don't like all the messing around with low-level details of getting the system running -- if you want them abstracted away: decide what you need to use 3D for, and maybe you can find more simple utilities.

If performance is not a super huge issue, you could always use freeglut to get your window up and running -- it abstracts some annoying parts of getting OpenGL up and running (window routines etc), but it isn't great for large projects (because it includes stuff you may not need or want and thus can bloat unnecessarily).

But that said, if performance is an issue, and you -are- creating a game (this -is- gamedev.net!) why not try Ogre, or Irrlicht, or even Torque if you want to spend some money (it's not that expensive)...Plenty of functionality, and the chance to get a game up in 3D in much less time than you will take if you roll your own engine (why waste 1-3 years if you aren't creating secret cutting-edge technology?)


Either way, make up your own mind -- but don't ignore all the alternatives.


~Shiny

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
COM initialization of D3D objects is IMO a lot more tedious than initializing an OpenGL context
That's bullshit. It actually takes more code to start up OGL than it does to start up D3D.

If you are using the straight windows API, fine, but if you are using a wrapper such as SDL (and you probably will be, for cross-platform compatibility if nothing else), it is a tiny bit shorter.

Share this post


Link to post
Share on other sites
Quote:
Original post by swiftcoder
Quote:
Original post by Promit
Quote:
COM initialization of D3D objects is IMO a lot more tedious than initializing an OpenGL context
That's bullshit. It actually takes more code to start up OGL than it does to start up D3D.

If you are using the straight windows API, fine, but if you are using a wrapper such as SDL (and you probably will be, for cross-platform compatibility if nothing else), it is a tiny bit shorter.


Exactly, besides I said more tedious (IE: more things to take into consideration), not nesesarily more code (IE: More typing).

Share this post


Link to post
Share on other sites
I like DirectX ... although I don't know Direct3D (tried to learn it once).

In my limited experience (covering about 5 people interested in making games, 2 dedicated to the craft), people who are dedicated to digging into it can easily learn either system, and often can learn both in only about 10-20% more time than learning one. People who are interested in the higher level stuff instead of 3D math and graphics for its own sake (as well as people who are light hobbiests) almost invariable find the OpenGL core concepts to be a great way to get a handle on fundamental 3D basics. Once beyond the basics they can then easily apply the knowledge to either API again. NEHE's tutorial is popular because it is easier to understand the first 8 or so tutorials than most other 3D systems - and it suits the brain for those that aren't already OO / COM / .NET / Component / Interface / or C++ gurus. Its just a simple strait C API that manages 1 shared state.

Like I said, for the core stuff (vertices, colors, rotate, transform, scale) ... once you go beyond the basics- OO designs really really help a lot ... even when learning ... so then most openGL start building their OO library anyway.

Share this post


Link to post
Share on other sites
Thanks for all the replies, I'll try to respond to as many of them as I can. Here it goes.

I just tried OGL, and I... Really like it, doing things like drawing simple triangles, with lighting and texture mapping is SOOO much easier then it is in Direct 3D. I do plan on making a renderer, I started on one over the summer for Direct 3D, got fed up with it, got bored because I had nothing to code, started learning some Win32 fundamentals again (no particular reason, I'm pretty decent as it is already, creating windows, handling messages, dialougs, resouces, ect.), went on a cancun vacation, and when I got back, was still pretty pissed with coding my very simple Direct 3D engine, so I quit for a while. I do belive having a solid knowlage foundation in bolth API's is good, for me, and getting a feuture job, so I'll learn Open GL, and most likely move back to Direct 3D when I have the fundamentals down better, not that they are bad, but .... you know. I do not want to use OGRE, or some other rendering engine, I would rather make it myself, thats just how I am. I am very good at Allegro, I started out learning to make games with allegro, and cherish it as a good 2d game making thing that I learned about 2 years ago. I've found that Open GL is good for me, because I do plan on making my own renderer, so I can pretty much abstract all my Open GL specific stuff into some nice Object-Oriented Classes (I AM very confident in my C++/Object Oriented programming skills), witch always makes me happier. Thank you all for your speedy responses :D .

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What I Like from GL, it's relatively easier than D3D, at first, when you get to the extension you'd wish you use D3D :D.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:

That has absolutely nothing to do with Direct3D. The DLL problem has to do with Direct3DX, which you don't have to use.


Actually it has VERY much to do with direct3D, although you technically do not have to use it, I dont think I have ever seen a single example of someone not using it. A lot of the incentive of Direct3D is that it provides a lot of out-of-the-box functionality. Consider loading textures of various file formats, mangining matrix operations, loading x-files, skinning setup, mesh rendering, material management, optimizations, LOD, ect... think about it and I think you will realize that D3DX is a important piece to the puzzle.


[/quote]

That's wrong too, since the API comes with an installer which can easily be included in your download or installer.
[/quote]

The point is that an up to date computer (meaning windows updates are up to date and has downloaded the most recent version of DX) will not necessarily be able to run your app. Just because they have 9.0 installed doesnt mean your 9.0 application will work, providing an installer that is either ran by your installation or by the client introduces hassel that is uneeded. Plus older 9.0 apps that dont use the newer 9.0 DLLs do not have installers that download the correct DLL for you (because there is none), and they dont seem to work with the new DLL version of 9.0. So yes, this is still an annoying problem, imo.. to both the developer and end-user of your app.


Quote:

Also, AFAIK the DLL problem is being handled in Direct3D10, but that's just heresay from a friend.


Not everyone has Vista or will have it right away, the step towards vista and DX10 seems fairly steep (which is good for games and standards). But not being able to support the hardcore-hardware/gamer market is usually essentual to an indie development. Supporting non 3.0 hardware would prob be good for indie development.

Quote:

As to the OP, go with what the other's have said and find out which one you like/can use better.


Adding onto this good point... Alo realize that the end user needs to be considered too (more hassel now with DX9.0 then it was in DX8.1). But yeah, openGL usually seems more straight forward to people ive noticed.

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