pouët.net

Beginner OpenGL vs DirectX

category: code [glöplog]
I mean, go to google.com, and start doing some graphics coding. No matter which tutorial you pick, if you managed to get 3d graphics to show up, you learned much more that evening than reading this thread. Every night you have the choice: (a) read more pouet bullshit, or (b) select any random tutorial and try it.
added on the 2013-11-18 20:11:20 by yzi yzi
Now I agree: just do it! Both APIs are useful, anyway. Most people (including myself) know both.
added on the 2013-11-18 20:15:17 by imerso imerso
I understand, I am trying right now :D
added on the 2013-11-18 20:16:33 by redo redo
If you think reading very many pouet posts will save you trouble, forget it. You have to try out many different things. Look at the code. Change it. Retry. No pain, no gain.
added on the 2013-11-18 20:19:05 by yzi yzi
One more thing... it's all about hours. If you see something good, you're looking at a lot of hours spent on trying and learning. It isn't good primarily because someone made a very good choice, it's good because they spent a lot of hours on it.
added on the 2013-11-18 20:21:46 by yzi yzi
I know it is a long way.
added on the 2013-11-18 20:24:24 by redo redo
Also, most nerds over here will discuss (and only apparently even fight) endlessly but surely all of them know both deeply. This is normal. It does not really matter which one you learn first, eventually you'll feel the need to learn the other. Then, after you know both, you'll probably join one of these endless discussions.

Good luck.
added on the 2013-11-18 20:28:05 by imerso imerso
I know that people here are skilled pros, thats why I came here to ask :) Thanks
added on the 2013-11-18 20:35:33 by redo redo
skilled pros? :D some may be, but most of us just fuck around
added on the 2013-11-18 20:46:55 by skomp skomp
Quote:
no point in spending time on learning legacy APIs


i've said it before and i'll say it now
but feel free to ignore my advice, amateur fucktards
added on the 2013-11-18 22:57:11 by superplek superplek
Quote:
Funny, I had the feeling that there were a bunch of OpenGL-fags who couldn't give credit where credit is due.

The correct term is "OpenGL-hipster". You're welcome.
Quote:

So? I never said that you should continue using D3D9/D3DX after you learnt the basics. I just said it was a good place to start.

That's your opinion, I beg to differ - for pretty obvious reasons.

Quote:

Then you will agree that after you learnt the basics with D3D9/D3DX, it is trivial to move to glm, DirectXMath or whatever other up-to-date library you may want to use when the time comes.

Why do that? It's pretty straight forward to go there directly.

Quote:

Okay, so you're arguing against using a somewhat outdated, yet well supported and well-documented API... but writing an entire software renderer from scratch (and then tossing it out because you will use modern D3D/OGL) is not ... harmful?
Sense is none.

Writing a software renderer is something COMPLETELY different, you get to know the basic principles and also learn some nice algorithmic approaches which will be very handy in some situations (e.g. bresenham aka DDA...).
And you are wrong about the "well supported" part. D3DX dlls are not shipped with any current windows installation and are not being automatically installed.

Quote:

Again, complete nonsense. Yes, D3D9 is somewhat outdated, but the pipeline and mathematics are well-documented, and they are still every bit as valid for modern D3D/OGL as they were for D3D9.

What the fuck? That's not complete nonsense in any way - you are exaggerating a bit here.
What's the point in learning math with D3DX? There are something like billions of options to learn the stuff, for some people reading a proper book is still a good choice. In my humble opinion a way better choice than reading some random old D3DX documentation.
By the way, knowing the D3DX math API does not help you in any way to read papers about current techniques - you should also know common conventions for equations etc.

Oh and btw. the tutorials on transforms etc. are not bad - but well it's DX eval order everywhere - all the matrices are transposed and most probably LH-coordinate systems - I don't like that notation (personal totally biased opinion. I prefer RH. Yes, I know you can also do RH with DX*).

Quote:

As I said, there is the bootstrapping problem. In D3D9 you can start by just feeding some matrices to the pipeline, and the fixedfunction pipeline will do the rest, and you get things on screen.
Then you can start playing around with the matrices, moving functionality to vertex shaders etc. It's just a more gradual approach, with more feedback along the way.

Well something like two days should be enough to have something nicely shaded on the screen. It's not like you only have the OpenGL 4.x/DX11.y specification and have to start completely from scratch (That could be kind of hard).
Why get something in 3 hours on the screen and waste a couple of days - maybe even weeks - playing around with the old stuff, just to notice a lot of things changed and the damn interfaces are quite different. Why not go hardcore directly? :D

Quote:

Again, look at the link I posted above. Yes, the lib will do everything for you, but Microsoft's documentation tells you EXACTLY what the lib does. It tells you how the matrix is calculated, and what the ideas behind these calculations are (viewing frustum, clipping planes etc). So you can read their explanation, and once you understand it, you can steal their code and use and modify it for your own shaders.

I get the distinct impression that you've never even bothered to look at the D3D9 documentation, else I wouldn't have so much trouble explaining why it is such a nice resource for beginners.

I have the very distinct feeling that you never had a proper computer graphics book in your hands.

Quote:

[...]Funny, I had the feeling that there were a bunch of OpenGL-fags who couldn't give credit where credit is due.[...]
[...]But if you must be an OpenGL-fag, and ignore my advice to start with D3D,[...]

stfu?



Quote:

thank you las, this is exactly what i wanted to say.

At least I'm not alone. :)

Quote:

Thanks to all people, for their knowledge and help in choosing API. I will take the modern OpenGL because I have basics of it including shaders, buffers, glm. There are also shadertoy, GLSL editor in chromeexperiments and many more. Special thanks for long and interesting(in depth going) answers like las,..

It was a pleasure to at least try to help.

<3

Scali: Insulting people preferring a certain API is not nice.
Again - just to be crystal clear - I DISAGREE with your opinion.
added on the 2013-11-19 00:28:13 by las las
Only D3D has D3DXCreateTeapot. Nuff said ;D
added on the 2013-11-19 02:59:06 by T$ T$
added on the 2013-11-19 09:38:39 by xTr1m xTr1m
Quote:
That's your opinion, I beg to differ - for pretty obvious reasons.


Flawed reasons yes, already covered that.

Quote:
Why do that? It's pretty straight forward to go there directly.


I already explained why, please, try to keep up.

Quote:
(e.g. bresenham aka DDA...).


Well, then I suggest you start writing a software renderer soon, because bresenham and DDA are not the same.

Quote:
And you are wrong about the "well supported" part. D3DX dlls are not shipped with any current windows installation and are not being automatically installed.


Lol, is that the best you can do? I already said that you can get a statically linked D3DX from older SDKs. Otherwise you can just bundle the DLL with your app.
The D3DX DLLs are automatically installed with the SDK obviously.

Quote:
What the fuck? That's not complete nonsense in any way - you are exaggerating a bit here.


NO U!

Quote:
What's the point in learning math with D3DX? There are something like billions of options to learn the stuff, for some people reading a proper book is still a good choice. In my humble opinion a way better choice than reading some random old D3DX documentation.


You have to start somewhere, and you already agreed that the math library you pick isn't very relevant. The reasons to pick D3DX for a beginner are simple: they come with the D3D SDK, and they are used in all the SDK sample code and documentation.
But again, I am repeating myself.

Quote:
By the way, knowing the D3DX math API does not help you in any way to read papers about current techniques - you should also know common conventions for equations etc.


We are talking about getting a BEGINNER started here. Not about implementing advanced state-of-the-art graphics algorithms.

Quote:
Oh and btw. the tutorials on transforms etc. are not bad - but well it's DX eval order everywhere - all the matrices are transposed and most probably LH-coordinate systems - I don't like that notation (personal totally biased opinion. I prefer RH. Yes, I know you can also do RH with DX*).


Thank you for this completely biased and useless information.
And yes, D3DX has functions for both LH and RH, it's trivial to switch from one to the other.
Once you start using shaders, it's also trivial to switch to a transposed matrix format, if you so please.

Quote:
Well something like two days should be enough to have something nicely shaded on the screen.


I think that is highly optimistic...

Quote:
Why not go hardcore directly? :D


I already explained why. Let's just agree to disagree.

Quote:
I have the very distinct feeling that you never had a proper computer graphics book in your hands.


And why is that? I never said a book wasn't a good resource. I just said that for a beginner, the D3D documentation gives you all the relevant information as well, so you wouldn't even need a book.

Quote:
At least I'm not alone. :)


Yes, there's tons of n00b OpenGL-fags... sorry OpenGL-hipsters around. They're a nuisance, just like all those linux fags.

Quote:
Again - just to be crystal clear - I DISAGREE with your opinion.


Who cares? Obviously you're a n00b. Clearly you have no hands-on experience with D3D, and clearly you don't know a lot about graphics in general either (not even knowing the difference between some basic algorithms like bresenham and DDA). You're just a biased OpenGL-fag with a big mouth.
added on the 2013-11-19 09:45:00 by Scali Scali
How about both of you go make a demo about it :I
added on the 2013-11-19 10:06:46 by msqrt msqrt
Quote:
How about both of you go make a demo about it :I
added on the 2013-11-19 10:16:25 by Tomoya Tomoya
the original post was a (probably unintentional) masterclass in pouet flame baiting, congratulations :)

in truth it doesn't really matter which one you choose. they're all just slightly different looking ways of pushing the same commands to the gpu. all of them have enough resources on the internet at the bottom end that it's easy enough to find something to copy to get going.

the real difference that matters at the sharp end is the shading language of choice (assuming you have the option).
personally after working with cg, glsl and hlsl (..and others only leet console coders will be aware of) i vastly prefer d3d hlsl - better code gen, offline compiles, compiler in dll not in driver so it doesnt differ at the front end on each card, and .fx files which are a really nice thing for ease of development especially when getting started.
added on the 2013-11-19 10:20:59 by smash smash
Quote:
the original post was a (probably unintentional) masterclass in pouet flame baiting, congratulations :)


Well, I wasn't initially even going to suggest a way to start... But then I figured I should...
Which of course got picked apart by OpenGL-fags, as usual.
Which leads me to the next:

Quote:
in truth it doesn't really matter which one you choose. they're all just slightly different looking ways of pushing the same commands to the gpu. all of them have enough resources on the internet at the bottom end that it's easy enough to find something to copy to get going


As some of us have already said, it's much more difficult to find good and up-to-date information and sample code for OpenGL than it is for D3D.

That is the primary reason why I suggested D3D as a beginner. And specifically D3D9, because it has a lower threshold than D3D10+.

Other than that I am not against using OpenGL at all, as I have already stated before. I have even given the link to a simple OpenGL framework (which includes shader and buffer support, so reasonably 'modern'), which is under the BSD license, and free for anyone to use and experiment with.

As opposed to the OpenGL-fags who can't even stand the mention of D3D, and start picking posts apart and insulting people for trying to give a beginner some good advice.
added on the 2013-11-19 10:29:17 by Scali Scali
To add to that, when I developed that OpenGL framework, the primary problem compared to D3D was the lack of D3DX: you need to supply your own code to load textures, compile shaders, and perform maths.
If OpenGL was a complete solution with a single SDK, it would be easier for a beginner to get started. Now it's just all over the place, with people offering competing solutions, debating why library X is better than library Y etc.
So I tried to create a simple D3DX-like solution for OpenGL.
added on the 2013-11-19 10:35:05 by Scali Scali
Quote:
Which of course got picked apart by OpenGL-fags, as usual.


you should get the shit outta your head and read: no one really argumented for open gl, just for not starting with legacy api.

Quote:
As some of us have already said, it's much more difficult to find good and up-to-date information and sample code for OpenGL than it is for D3D.


actually i never had that problem, and the OP came up with 4 resources on current opengl within quite a short time, didn't he?

bottom line: if you are too dumb to read, you should not post. feels just right to call you an asshole, not a dx asshole though, coz it's an individual thing.

plonk
added on the 2013-11-19 10:37:05 by skomp skomp
Quote:
actually i never had that problem, and the OP came up with 4 resources on current opengl within quite a short time, didn't he?


Quality vs quantity...
added on the 2013-11-19 10:39:54 by Scali Scali
so you read all the docs? and you claim they are shitty?
added on the 2013-11-19 10:41:55 by skomp skomp
Quote:

[...Random insulting bullshit...], because bresenham and DDA are not the same.

Seems we finally found something you are right about! They are of course not the same but in a way close relatives - but you can easily ignore that and shout out "WRONG WRONG WRONG" without going into further detail (actually I find it quite good that you found that one - seems you at least tried to read my posts).

If you find any other factual inconsistencies in my post in this thread - feel free to discuss them, but please in a less aggressive/insulting way.

Due to people like you - pouet is becoming more and more a complete waste of time - thanks.
Since I'm obviously a complete beginner I have to learn some pretty basic stuff!
I'm out of here.

P.S.: Oh btw. are you homophobic? You seem so open minded in your choice of words.
added on the 2013-11-19 10:44:44 by las las
I'm saying that it's nicer to have a single resource with ALL information, in a clear and consistent stype (MSDN), than to have to wade through the internet, picking up articles here and there with fragments of information from unofficial sources, sometimes with conflicting information etc.

And that is my experience as an EXPERIENCED developer who wanted to update his OpenGL codebase a few years ago. I can only imagine what it must be like for a BEGINNER to try and get the hang of OpenGL. At least I knew what to look for, and what to expect.
added on the 2013-11-19 10:45:13 by Scali Scali

login