954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

direct3d or opengl

hello,

i'm willing to learn direct3d but i can't find tutorials for it, youtube has few video tuts but they are very unclear. Do you know any free e-books or sites where i can start learning?

Another question is directx better than opengl? from my experience opengl needs a lot less code than directx. So directx is harded?

Thanks for replies.

evaldaskowka
Newbie Poster
10 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

Why would directx be better? OpenGL will run on non windows platforms, directx will not. In my opinion both are as hard to learn, and are equally good for drawing shit on the display. Also OpenGL would be better learn if you want to do graphics for phones and stuff, like iphone, android, iPad etc.

You can create whatever graphics and effects you like using both libraries. They both rely on the same principles. Learning one of them will make learning the other one easier, just like learning java makes learning C++ easier, or the other way around. What is it you want to do exactly? What is your goal?

My suggesion would be to go for OpenGL and jump into shaders from the beginning.

SasseMan
Junior Poster
176 posts since Jan 2010
Reputation Points: 70
Solved Threads: 19
 

My goal would be to learn one of them so i could be game developer someday i already know c++ i just need graphics.
Now i found some directx but it looks way more difficult than opengl, even creating a simple window is a headache..
i had some problems running opengl on visual studio so i dont want to start messing with it again..

evaldaskowka
Newbie Poster
10 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

I'm with SasseMan; learning OpenGL will allow you to target a much wider variety of platforms.

Something to be aware of: OpenGL only handles the graphics. It doesn't specify how you create a basic window, or if there is even a window involved. You'll still have to rely on OS-specific code to create what OpenGL calls a context . Once you have an OpenGL context, basic drawing is pretty straightforward. I don't know what problems you had with Visual Studio, but I wouldn't be surprised if most of them were related to creating the context.

Some libraries that can create OpenGL contexts for you on a variety of operating systems are freeglut and GLFW . Both of these libraries also handle user input from the keyboard, mouse, and joysticks. If you're using these or one like them, they don't include sound, so you might consider OpenAL , an API for 3D audio.

Another alternative to all of the above is SDL , which covers graphics, input, and audio all together.

gusano79
Posting Pro
521 posts since May 2004
Reputation Points: 182
Solved Threads: 77
 

Yes GLUT is a good place to start to get rid of OS headaches. http://www.opengl.org/resources/libraries/glut/

SasseMan
Junior Poster
176 posts since Jan 2010
Reputation Points: 70
Solved Threads: 19
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You