Tag Info

Hot answers tagged

49

I know this is an old post, but I saw this post being referenced and dislike the chosen answer's tone. So I did a bit of investigation! DirectX is old. It was first released in 1995, when the world had much more than Nvidia and ATI, DirectX vs OpenGL. That's over 15 years, people. 3dfx Interactive's Glide (one of DirectX's competitors back in the day. ...


25

Both OpenGL and SDL are C libraries and expose a C interface to the rest of the world (as pretty much every language out there can interface with C but not necessarily with C++). Thus, they're restricted to the procedural interface that C gives you and the C way of declaring and using data structures. Over and above the "interfacing with other languages" ...


21

I'm surprised nobody mentioned something: OpenGL works in a left-handed coordinate system too. At least, it does when you're working with shaders and use the default depth range. Once you throw out the fixed-function pipeline, you deal directly with "clip-space". The OpenGL Specification defines clip-space as a 4D homogeneous coordinate system. When you ...


13

There is no such thing as a fast track to C++. C++ is one of the most complicated languages to master properly. And also OpenGL and computational geometry is a vast field, time consuming to learn. OpenGL is some graphics API. But saying it was the best API for graphics is like saying a workshop full of tools and all the raw materials are the best for ...


11

This answer comes a bit too late, but I hope to shine light to others (particularly now that C++ standard committee wants to incorporate Cairo into std): The reason nobody really cares about "accelerated vector graphics" is because of how GPUs work. GPUs work using massive parallelization and SIMD capabilities to colour each pixel. AMD typically works in ...


10

They are both essentially equivalent, as one can be easily transformed into the other. The only advantage I can find for the left-handed system is: as objects are farther away from the observer, in any direction (x, y, or z), the distance is a higher value. But I have no idea if this is why Microsoft chose one over the other. POV-Ray also uses a ...


10

It's pure history. In ancient days the early cave-graphics programmers thought of the monitor (teletype? stonetype?) viewing surface as two dimensional graph paper. In math and engineering the usual conventions for plotting data points on graph paper is: x=right, y=up. Then one day, about a week after the invention of the silicon wheel, someone thought ...


7

This topic triggers an old debate of CPU vs GPU, and there are tons of documents and papers out there explaining the differences between these processors. But just to summarize a few things, remember that each processor was made for a specific task. GPUs dedicates more transistors to data processing, and from the memory usage point of view, CPU is optimized ...


7

Before I begin, in the interest of full disclosure, I have my own set of intro OpenGL tutorials. So feel free to take my assessment in that regard. First, ICG 5th edition has been supplanted with ICG 6th edition, which teaches from shaders. You should look into that, as shaders are important. However, looking at the blurb on Amazon, it seems to stop with ...


7

Except OpenGL, I never used those libraries, but I'm going to try to guess, by reading wikipedia pages, like you did. You seem right about Mesa. Here is the additional info we have : "The X window system is a computer software system and network protocol that provides a basis GUIs for networked computers. It creates a hardware abstraction layer." "GLX ...


7

I think you are confusing "writing a library" vs. "exposing API to outside". I don't know much specifically about the libraries you've mentioned (they might be internally written in C), but I know many others, myself included, have written C++ libraries/frameworks which fully utilized all kinds of fancy OOP practices/patterns, but still exposed C-style API ...


6

Both OpenGL and SDL are C libraries, not C++ libraries. You can use them from C++, but they're written in C and have a C API (which is also accessible from other languages; C++ is a pain to access via a FFI). Have a look at Boost for a large array of general-purpose (and some specialized) C++ libraries and SFML for a C++ multimedia library.


5

The thing to understand is that a HUGE amount of programmer time has been wasted converting between left-handed and right-handed coordinate systems, and even more programmer time has been wasted remembering which system was needed at any particular instant. All of that went away when right-handed coordinate systems became the industry standard. There are ...


5

OpenCL is a language/API for doing general purpose highly parallel calculations on a graphics card, but can also be used to generate computed images which are displayed by openGL or directX It's an open standard (like openGL), CUDA is the NVIDIA only competitor. Why? Because your $100 graphics card can do 1000s of tasks in parallel - turning it in a ...


4

I'd like to see a library which is elegant and simple to use with Haskell. The rest is technical details that should serve this purpose, not redefine it. Thus my $0.02. Don't base it on an existing toolkit, like Qt or GTK or FLTK or... — this will severely limit you and will probably give you far more pain than profit. PyQt is, erm, funny and contrived ...


4

To all those who think there is no advantage to right- or left-handedness, you are absolutely wrong. The right-handedness of Cartesian co-ordinate systems comes from the definition of the vector cross product. For XYZ basis vectors u, v and w, w = u X v. This definition is fundamental to vector mathematics, vector calculus and much of physics. Suppose ...


4

The Google Maps API licensing page explains this fairly well, to summarise, there are three types of license: Google Maps API The Google Maps API is a free service that lets you embed Google Maps in your freely accessible web pages or mobile apps. Your service must be freely and publicly accessible to end users. Google Maps API for Business Google ...


4

It's no longer advised to code directly to assembly. It was important during Nvidia FX5xxx/Radeon 9700 era. A very long time ago. Now all shaders are compiled by drivers to extract max performance out of the platform. Use OpenGL shading language, or use Nvidia Cg to generate an assembly from C++ like code.


4

Have a look at this OpenGL tutorial. The chapter on textures explains how to do exactly what you're looking for--deal with a texture as specifically an array of numeric values instead of as graphical data--but the whole thing is worth reading.


3

I think for fractals, I'd probably start with the orange book (the one on OpenGL Shading Language). It includes source for (among many other things) a Mandelbrot shader that'll let you draw an image of the Mandelbrot set onto some arbitrary geometry (a plane, sphere, or whatever). Since it runs directly on the graphics hardware, it's also usually pretty fast ...


3

The only two books that anyone would probably recommend are: The OpenGL SuperBible The "Red Book" The Red Book is the official OpenGL specification, and is written in the form of a tutorial. The current edition is (I believe) 7th Edition, which covers OpenGL 3.0 and 3.1. It is a must to own. The SuperBible is a slightly friendlier tutorial. The current ...


3

The lead developer of DirectX (and Direct3D) Alex St. John recently commented on that. In an article on the history of Direct3D he wrote: I [...] was asked to choose a handedness for the Direct3D API. I chose a left handed coordinate system, in part out of personal preference. [...] it was an arbitrary choice. Source: ...


3

The real answer to Direct3D's early left handedness is a lot less sinister than some of you are speculating. DirectX got its start when Microsoft bought RenderMorphics back in 1995. At that time the standard graphics text used in the RenderMorphics offices was "Principles of Interactive Computer Graphics" by Newmann and Sproul which does everything using ...


3

Interesting fact. Direct3D (not DirectX - DirectX also covers input, sound, etc) actually doesn't have a left-handed co-ordinate system. It's perfectly capable of supporting both RH and LH systems. If you look in the SDK documentation you'll see functions such as D3DXMatrixPerspectiveFovLH and D3DXMatrixPerspectiveFovRH. Both work, and both produce a ...


3

Neither is ultimately better than the other - you're mapping 3D coordinates to a 2D surface, so the third dimension (which actually makes things 3D) can be chosen arbitrarily, pointing at the viewer or into the screen. You're going to put things through a 4x4 matrix anyway, so there is no technical reason to choose one over the other. Functionally, one could ...


3

It's worth pointing out that besides games, OpenGL is underneath the graphics of most of the new handheld devices (smartphones and tablets). While you don't need to talk directly to the OpenGL layer to do most things in general apps it's always worth knowing something a little deeper than your competitors.


3

What you're looking for is projective texture mapping, for which there are many tutorials and which has been possible in all versions of OpenGL: SGI's sample code was written for OpenGL 1.0. What you do is essentially apply a perspective transformation on the texture when you apply it to an arbitrary surface.


2

I don't know much about the job market in India, so I can't tell you anything about how "job-oriented" OpenGL is there. I work in the US writing software tools for 3D animators, so I do know something about the field in general. The first thing I would say is that there are much easier ways to make a living as a programmer than doing graphics and graphics ...


2

OpenGL never hurts, and if you know how it works you can do great things with it. But you have to be into graphics and advanced trigonometry to enjoy it and create good things. It really depends on what kind of software you want to develop. 3D engines, modelling tools or applications like web browsers, music players all have very different kind of ...


2

This depends on the hardware as well as how you're attempting to do things. OpenGL has its ups and downs and actually can perform quite well on a CPU. There's too many factors here (at least I think so) because hardware is a pretty big variable and CPU's with SSE instruction sets can quite easily handle a lot of these things. I'm not sure why you would get ...



Only top voted, non community-wiki answers of a minimum length are eligible