Archived

This topic is now archived and is closed to further replies.

OpenGL OpenGl vs. DirectX

This topic is 5896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i want to start learning game programming. Should i learn OpenGL or DirectX ? Which is easier to learn, more powerful, more supported etc.? cu ds

Share this post


Link to post
Share on other sites
A search in all forums for "opengl vs directx" yielded at least 11 hits with that string in the topic.

Share this post


Link to post
Share on other sites
I like stories.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Haha nice joke.

Here we go again

Share this post


Link to post
Share on other sites
"A search in all forums for "opengl vs directx" yielded at least 11 hits with that string in the topic." -NewDeal

No, that is incorrect sir.

A search in all forums would produce at least 12. =)


HAHAHA I love when people straight up say "So what do I start first: ogl or dx?"

its very amusing.

Im sorry, I get too excited.

Share this post


Link to post
Share on other sites
I like the way that these questions get posted in either the DirectX or OpenGL forum, but the posters still expect an unbiased answer.

Share this post


Link to post
Share on other sites
Yes good point.

HERE"S AN IDEA!

Search the web for articles BEFORE posting stuff like "Which is better, OpenGL or DirectX"..


LOL come to think of it, I was online the other day and saw someone post the following

"Hello. I am new to opungl and I wanted to make something like quake only with more weapons. how do I do this?"

(The above was a direct quote, no bull shit)


It''s rather amusing, really.

Share this post


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

LOL come to think of it, I was online the other day and saw someone post the following
"Hello. I am new to opungl and I wanted to make something like quake only with more weapons. how do I do this?"
(The above was a direct quote, no bull shit)

It''s rather amusing, really.



Yes, I saw something similar some time ago, there was a newbie asking on how he could write a black''n''white clone, he was (in his own opinion) a very advanced programmer, with over *3 months* of VB experience ! WOW

I agree, it''s funny...

Share this post


Link to post
Share on other sites
Well, you could do what I did, and write a multi-graphics engine that supports Direct3D, OpenGL, and Glide rendering (this is a sprite engine btw, so also has support for software GDI and DirectDraw).

Darksailor, what is your purpose for learning any 3D API? Download the documentation for both, and try the one that seems easier to learn for you. Once you''ve done that, try the other one.



MatrixCubed
http://MatrixCubed.cjb.net






Share this post


Link to post
Share on other sites
Ya good Idea!

Hey Shining Knight; I know once you read this you''ll close it, bu hey; Try to get a forum JUST FOR DX vs. OGL. It''d be a good place to watch all the posters to.

overnight youll get around 1000000 posts lol.

Share this post


Link to post
Share on other sites
as a noob i can say that using ogl is WAY easier than setting up direct x

but that''s just me

Share this post


Link to post
Share on other sites
Well , I understand that experienced game programmers can be fed up of answering questions about direct x vs opengl, nevertheless it is key question for a beginner.

For example I lost about two years getting started with Direct x.

In my opinion it would be fair to inform the Dev comunity that:

Opengl is the best choice to grasp the basic of graphic programming as well as for amateurs or shareware developers, Direct x is a must for anyone who want to undertake a career as professional game programmers.

Share this post


Link to post
Share on other sites
Heres one:

Should I learn OpenGL or DirectX? I heard both are too hard for people who have no programming expierience so I decided to make my own API. Any advice?

LOL. If someone ever posted that...

------------------------------
(Since noone seems to look at the article proposal forums..)
Interested in Flash tutorials on GameDev? Speak Up Here!

"He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss, the abyss also gazes into you..."~Friedrich Nietzsche

Share this post


Link to post
Share on other sites
AlbertoT: while your post may be somewhat accurate. a newbie should NOT be worrying about whether to use OpenGL or DirectX, but rather learning how to program. Becoming a proficient developer takes time and practice. Once one has achieved a command of programming logic then one can venture into specific API''s and platforms. If someone is going to get into 3D programming then they should understand the basic concepts of 3D theory, such as trigonometry. Armed with knowledge one can easily determine with a couple test programs which 3D API will suit their needs. This POST has nothing to do with a persons skill level, but rather the individual''s resistance to learn anything on their own. i.e. jumping the computer programming bandwagon. it''s like me going up to Vince Carter and asking him "do you think i should shoot at a 35 degree angle or 40"? it all depends on the person. it''s pretty simple, i tried Direct3D for a couple weeks (4 years ago) and didn''t like it, so i bought the OpenGL reference guide and followed the examples. thus, based on my own experiences was able to determine which API i should use. i also experimented with "glide" but stuck with OpenGL. questions like this POST are ignorant and is a real sign of lazy programmer.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
jenova
Thanks for your comments.
I think that the correct choice depends on what Darksailor is looking for, but also that our comunity should help him to make the correct choice instead of providing generic or ironic answers.

For example , I have a basic software and a deep engineering background from school.
my job has nothing to do neither with programming nor engineering.
I can dedicate few hours a week only to my hobby.
Sometimes I dream to make money with my games but when I wake up and I realize it is a dream.
When I sit down in front of my computer, after dinner , the only thing I ask is to have fun and not to get an headache.

Would you honestly suggest to me to use Direct x.?


Share this post


Link to post
Share on other sites
DirectX versus OpenGL, hmmm.

well, one thing that I can input is that DirectX covers more areas of game programming other than graphics. DirectInput, DirectSound, DirectDraw, Direct3D, and more are all parts of a larger picture. And the thing is with DirectX, is that when you learn one part (like DirectSound or DirectDraw), the rest of the parts are easy to learn because they use the same concepts and setups.

Plus, as one person stated, DirectX experience is pretty much a prerequisite for becoming a professional. If you check any help-wanted ads in game company websites (like Midway or Capcom), you can see the backup to this statement.

OpenGL is good, and it''s pretty easy as far as I can see. If you just want to focus mainly on graphics, and just want to make games and projects for yourself, I''d try to learn that first.

Share this post


Link to post
Share on other sites
my POST has nothing to do with OpenGL vs. Direct3D (obviously not the entire DirectX API). and i see nothing wrong with helping people who have difficult to find questions. i have even coded examples with comments and e-mailed it to people from this message board. the argument here is that people are (becoming/being) lazy. computer programming is NOT easy. i''ve spent the last 15 years proving that point. and i still have to ask questions. but, geez, if you want to become a programmer (which the original POSTER has stated) then you should know how to use a search engine. how long does it take to search for examples, definitions, specs, etc. or code a simple test to render some polygons whether using Direct3D or OpenGL. that''s how you learn, not by asking people to make your every decision for you.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
quote:
Original post by AlbertoT
I think that... our comunity should help him to make the correct choice instead of providing generic or ironic answers.

There is nothing generic or ironic about asking someone to make use of his brain - or a search engine if that fails.

quote:
<Cutting a lot of description>
Would you honestly suggest to me to use Direct x.?

Yes, why not? I have an engineering background as well but have been programming C++ for 6+ years and I don''t like OpenGL. It''s still a question of preference and the way your brain works. If you prefer
Device->DrawPrimitive(primitive_type, ...); 

to
glDrawPrimitive(primitive_type,...); 

then use DirectX. Otherwise use OpenGL.

The real critical issue is that every aspiring professional programmer must learn to use tools [s]he isn''t exactly ecstatic about, from operating systems and APIs to programming languages.

Share this post


Link to post
Share on other sites
You have no idea how tired I am of these threads. Please, read the FAQ before you start posting, and if you really wanna find out about DX vs. GL, search for previous posts.

And if you guys want a PERMANENT thread about DX vs. GL, have Dave set you up one.

------------------------------
Trent (ShiningKnight)
E-mail me
ShiningKnight Games

Share this post


Link to post
Share on other sites

This topic is 5896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.

  • Similar Content

    • By _OskaR
      Hi,
      I have an OpenGL application but without possibility to wite own shaders.
      I need to perform small VS modification - is possible to do it in an alternative way? Do we have apps or driver modifictions which will catch the shader sent to GPU and override it?
    • By xhcao
      Does sync be needed to read texture content after access texture image in compute shader?
      My simple code is as below,
      glUseProgram(program.get());
      glBindImageTexture(0, texture[0], 0, GL_FALSE, 3, GL_READ_ONLY, GL_R32UI);
      glBindImageTexture(1, texture[1], 0, GL_FALSE, 4, GL_WRITE_ONLY, GL_R32UI);
      glDispatchCompute(1, 1, 1);
      // Does sync be needed here?
      glUseProgram(0);
      glBindFramebuffer(GL_READ_FRAMEBUFFER, framebuffer);
      glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                                     GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, texture[1], 0);
      glReadPixels(0, 0, kWidth, kHeight, GL_RED_INTEGER, GL_UNSIGNED_INT, outputValues);
       
      Compute shader is very simple, imageLoad content from texture[0], and imageStore content to texture[1]. Does need to sync after dispatchCompute?
    • By Jonathan2006
      My question: is it possible to transform multiple angular velocities so that they can be reinserted as one? My research is below:
      // This works quat quaternion1 = GEQuaternionFromAngleRadians(angleRadiansVector1); quat quaternion2 = GEMultiplyQuaternions(quaternion1, GEQuaternionFromAngleRadians(angleRadiansVector2)); quat quaternion3 = GEMultiplyQuaternions(quaternion2, GEQuaternionFromAngleRadians(angleRadiansVector3)); glMultMatrixf(GEMat4FromQuaternion(quaternion3).array); // The first two work fine but not the third. Why? quat quaternion1 = GEQuaternionFromAngleRadians(angleRadiansVector1); vec3 vector1 = GETransformQuaternionAndVector(quaternion1, angularVelocity1); quat quaternion2 = GEQuaternionFromAngleRadians(angleRadiansVector2); vec3 vector2 = GETransformQuaternionAndVector(quaternion2, angularVelocity2); // This doesn't work //quat quaternion3 = GEQuaternionFromAngleRadians(angleRadiansVector3); //vec3 vector3 = GETransformQuaternionAndVector(quaternion3, angularVelocity3); vec3 angleVelocity = GEAddVectors(vector1, vector2); // Does not work: vec3 angleVelocity = GEAddVectors(vector1, GEAddVectors(vector2, vector3)); static vec3 angleRadiansVector; vec3 angularAcceleration = GESetVector(0.0, 0.0, 0.0); // Sending it through one angular velocity later in my motion engine angleVelocity = GEAddVectors(angleVelocity, GEMultiplyVectorAndScalar(angularAcceleration, timeStep)); angleRadiansVector = GEAddVectors(angleRadiansVector, GEMultiplyVectorAndScalar(angleVelocity, timeStep)); glMultMatrixf(GEMat4FromEulerAngle(angleRadiansVector).array); Also how do I combine multiple angularAcceleration variables? Is there an easier way to transform the angular values?
    • By dpadam450
      I have this code below in both my vertex and fragment shader, however when I request glGetUniformLocation("Lights[0].diffuse") or "Lights[0].attenuation", it returns -1. It will only give me a valid uniform location if I actually use the diffuse/attenuation variables in the VERTEX shader. Because I use position in the vertex shader, it always returns a valid uniform location. I've read that I can share uniforms across both vertex and fragment, but I'm confused what this is even compiling to if this is the case.
       
      #define NUM_LIGHTS 2
      struct Light
      {
          vec3 position;
          vec3 diffuse;
          float attenuation;
      };
      uniform Light Lights[NUM_LIGHTS];
       
       
    • By pr033r
      Hello,
      I have a Bachelor project on topic "Implenet 3D Boid's algorithm in OpenGL". All OpenGL issues works fine for me, all rendering etc. But when I started implement the boid's algorithm it was getting worse and worse. I read article (http://natureofcode.com/book/chapter-6-autonomous-agents/) inspirate from another code (here: https://github.com/jyanar/Boids/tree/master/src) but it still doesn't work like in tutorials and videos. For example the main problem: when I apply Cohesion (one of three main laws of boids) it makes some "cycling knot". Second, when some flock touch to another it scary change the coordination or respawn in origin (x: 0, y:0. z:0). Just some streng things. 
      I followed many tutorials, change a try everything but it isn't so smooth, without lags like in another videos. I really need your help. 
      My code (optimalizing branch): https://github.com/pr033r/BachelorProject/tree/Optimalizing
      Exe file (if you want to look) and models folder (for those who will download the sources):
      http://leteckaposta.cz/367190436
      Thanks for any help...

  • Popular Now