Assuming I were to develop a graphics engine for a modern PC game that used only DirectX or OpenGL, which techniques could I use to make sure it ran quickly?


I'm looking for any approaches that I could take that would result in a speed increase.

By graphics engine I mean general purpose graphics engine - such as the one used in Unity or Ogre3D.

  • 3
    \$\begingroup\$ -1, The question is way too vague to be useful. If you had a specific system with some background information on how it worked there might be an answer there on how to speed things up. But as it stands it's about as useful and insightful as "how can I make my fps go up". \$\endgroup\$
    – Tetrad
    Commented Nov 5, 2010 at 19:51
  • \$\begingroup\$ "how can I make my fps go up" is exactly what I'm looking for. I think the answers would be very useful. \$\endgroup\$ Commented Nov 5, 2010 at 19:54
  • 1
    \$\begingroup\$ -1: 'Quickly' on what? PC, Mobile, WebBrowser, or Console? 'Modern' is waaay to vague. \$\endgroup\$ Commented Nov 5, 2010 at 19:55
  • \$\begingroup\$ I've specified modern PC game, although I think many of the approaches may be platform independent. \$\endgroup\$ Commented Nov 5, 2010 at 19:56

2 Answers 2


That question is quite the rabbit hole, as stated in another answer don't just make an engine. That's your first mistake you're generalizing something that is inherently specific, performance is all about specifics you have to write code tailored to a specific platform to run a specific type of game.

These optimizing tend to go as low level as possible, writing custom memory allocators, optimizing cache use, making good use of parallelism, having good algorithms, etc. and like I said a lot of these topics are a big rabbit hole full of "black magic", that will take months to learn much less master.

Unless you have a concrete game idea and a platform you will dedicate yourself to for a while, just don't bother you'll be better of with good enough performance and more time on the actual important thing, a good game. Besides hardware is always getting faster so speed won't be an issue for long anyway.

  • \$\begingroup\$ I'm well aware of 'make games, not engines'. Are you saying it's not possible to describe any of 'optimizing cache/making good use of paralleism/having good algorithms' without me making the purpose of the graphics engine more specific? \$\endgroup\$ Commented Nov 5, 2010 at 20:06
  • \$\begingroup\$ Yep, you can't optimize without a specific target in mind, optimizing code for an X86 machine will be horrible in PS3's Cell, hell if you go deep enough optimized code for Intel chips will be slower in AMD ones. It's the same for algorithms, some might be "faster" on theory but very inefficient in cache use while another "slower" one end up faster because it has better cache use, and they both can be slower on another hardware architecture with different kinks. \$\endgroup\$ Commented Nov 5, 2010 at 20:18

Use an existing engine.

There is no "general purpose" in gaming.

  • \$\begingroup\$ Let's say for a generalised graphics engine, for example one that fulfils the same needs as Ogre or Unity. \$\endgroup\$ Commented Nov 5, 2010 at 19:45
  • \$\begingroup\$ I'm going to attempt a reword to make it clear what I'm looking for. \$\endgroup\$ Commented Nov 5, 2010 at 19:49

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