Skip to main content
gamedev.net
🔒 Locked

advice needed

Started by Dragon_Strike Aug 7, 2007 at 4:18 AM 3 replies 950+ views
Original Post
Dragon_Strike
Dragon_Strike
i hope this is the right forum for this... but id like some advice regarding opengl vs directx... ive been learning some opengl for a few years.. and i like it... however id like to maybe sometime in the future get a job in graphics programming... and im gettin a bit unsure about opengl since most companies seem to use directx... is it easier to get a job if your good at directx than opengl? i dont want to start a topic of which one is better than the other... id just like some real-life facts about the job market...
Ashkan
Ashkan
OpenGL is still the dominant API when it comes to CAD tools mostly due to its backwards compatibility and support for immediate-mode rendering. Most CAD tools don't need the topnotch kickass effects seen in games (not implying that it's not possible to do such effects with OpenGL) nor do they need that high performance rendering code since they can get away with lower frame-rates or maybe updating the scene on changes or such. What they do care more about is the cost of development and maintenance. Just assume what hell they had to go through to port their softwares to Vista? Most of the rendering code should have been touched had they used Direct3D as the back-end renderer. Direct3D happens to have a tendency towards sudden big changes such as this one. A lot of code breaks down with each major update of the API and this is not something those companies are willing to pay for. One major company that I work for is still using immediate-mode OpenGL calls and is perfectly happy with that. I feel I'm going to rot! [grin]
viller
viller
Ashkan are you saying OpenGL is slow? Why does most 3d software use OpenGL then?
Ashkan
Ashkan
No, not at all. OpenGL is not slow at all, but immediate-mode is:
Quote:

Immediate mode is way of interacting with graphics APIs. It is a simple way of sending data to the card piece by piece, i.e. sending vertices one by one. The alternative way of working is to submit large chunks of memory in one go for rendering.


Immediate mode is quite useful in some situations:

* Prototyping applications, and creating proof-of-concepts
* Writing testing code
* For one off settings like vertex color


However, when submiting anywhere near a reasonable load to the video card the cpu time wasted making a large amount of function calls becomes significant. Using a call that submits a big chunk of memory in one go is a lot more efficient and preferred in nearly all circumstances. Also, when submiting a block of vertices the processor can quite efficiently process them in a big stream using modern instructions.


The original wiki from which I quoted the above paragraph can be reached here.

Direct3D had support for immediate-mode back in the days of DX7 but the support was dropped in later versions: Direct3D Immediate Mode, while OpenGL still supports the feature due to its commitment to backwards compatibility.

Actually OpenGL is a more lightweight API compared to Direct3D and as witnessed by [Wloka 2003] in its infamous article "Batch, batch, batch: What does it really mean?" a CPU-bound OpenGL application is capable of submitting 1.7-2.3 times more batches compared to its Direct3D counterpart.

As sated before, the reason CAD softwares are using OpenGL IMHO is due to its commitment to stay backwards compatible. Actually immediate-mode is a nice side effect of this.

I love both APIs, don't want to start a flame war here ;)
jpetrie
jpetrie
It is more important for you to know the underlying principals of graphics programming than to know either API. An API is trivial once you understand the fundamentals; you can pick up a new one with a minor bit of effort.

So pick one and learn it. It doesn't really matter which is more common in the industry as 95% of the time you will be working on established code bases above the level of the underlying API anyway. Pick one, learn the fundamentals.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.