I really don't want to be boring, I searched a lot but didn't found a focused answer to this question. I wanted to focus on the role of C++ in graphics programming.

Can somebody explain, which are most likely/ most often used C++ features (such as data structures), which are used in graphics programming? I am supposed to have an interview on this topic, so please shed some light on the features I should emphasize for an interview specific to C++ graphics programming.

  • 6
    \$\begingroup\$ Probably variables. \$\endgroup\$ Nov 1 '11 at 14:06
  • \$\begingroup\$ What kind of interview is this? A job interview? \$\endgroup\$ Nov 1 '11 at 14:07
  • \$\begingroup\$ YES it is job interview \$\endgroup\$ Nov 1 '11 at 14:09

For a job interview, I would suggest you worry less about the ability to recite commonly-used features and techniques (if you're doing this by rote, any good interviewer will see right through you and you'll fail the interview, and if they're not a good interviewer you probably don't want to be working for them).

Instead, since graphics programming is often a performance-critical area, focus more on understanding the performance implications of common language features. Understand things like:

  • the performance characteristics of pass-by-reference versus pass-by-value.
  • the importance of cache coherency and its impact on performance
  • the cost of allocations during a frame and how to alleviate said cost
  • how dynamic dispatch is typically implemented and what that means for performance

Bonus points if you can correctly demarcate what is a standard C++ guarantee and what is an implementation detail (virtual functions, for example, are the latter -- albeit a very common one).

Each of those topics is a great question on its own (although some more appropriate for StackOverflow than here), so if you want further direction in your study I recommend you post new questions.

Finally, a comment on the original thrust of your question: graphics programming is a language-agnostic domain. The algorithms used will vary widely depending on the kind of rendering one is after, the requirements and limitations of one's platform, and the individual effects one wants to achieve. The combination of all of that will dictate ideal data structures and techniques (although even with that much specificity, there's no obvious "best" choice) and thus what language features may ultimately be employed to achieve the desired results.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .