The central processing unit on your
computer can do just about anything. But even the craziest computers’ CPUs
only have about eight cores these days which isn’t enough to render
a complex scene in real time. Fortunately, your computer and
phone also have say, graphics processing unit, or GPU. GPUs are chips purpose built
to pump out pixels, and some can have thousands of cores. Each of these cores is pretty
limited in what it can do, though, and groups of these cores
have to work together in a lock step, each executing the same
instructions each clock cycle. So while the GPU is less
flexible than a CPU, it can spew out pixels
at some absurd rate. So the code we run on the CPU
determines what we want to draw. And then we send those
instructions over to the GPU which will actually figure
out the pixel colors. To do this we need a language for
communicating between the CPU and the GPU. The most common language for this purpose is called
the Open Graphics Language or OpenGL. Smartphones use a slightly scaled
down version of this language called OpenGL ES, where the ES stands for
embedded systems. If in a Microsoft universe
you’ve ever heard of DirectX, that’s a language that serves
essentially serves the same purpose. So to sum up the CPU uses OpenGL
to tell the GPU what to draw. The GPU builds up the actual
array of colors and ships it to the electronics
that run the screen. Brief aside, I’d be failing
as a nerd if I didn’t mention that you can actually do far more
with GPUs than just color pixels. There’s a whole field of
general purpose GPU computing. Algorithms that run on GPUs
need to be very clever about how they get those
lock-stepping cores to work together. But when they do, they can be extremely fast, and as is
often even more important these days, extremely energy efficient in
terms of power per calculation.

The CPU, the GPU, and OpenGL
Tagged on:         

7 thoughts on “The CPU, the GPU, and OpenGL

  • July 7, 2018 at 6:46 am


  • July 21, 2018 at 6:27 am

    good video but you kinda over simplified it

  • August 11, 2018 at 12:00 pm

    Thanks now I know what is opengles and why when I try to emulate a sonic heroes game but it says your opengles driver is not support.bla bla thingy Thanks :d

  • January 30, 2019 at 9:41 pm

    Well, I work with OpenGL, can you expand on how pipelines work etc? How to speed up OpenGL rendering and so on…?

  • March 9, 2019 at 8:00 pm

    doesnt opengl stand for open graphics library. Not open graphics language?

  • June 14, 2019 at 3:15 am

    His (?) hair sorta looks like it's been shoved up one too many corsair RGB fans, and now they have to work at udacity of all places, living paycheck to paycheck in order to give back the money she owes to the mafia… Great video, thanks for making something so comprehensible I barely learned a dosh garn thing.

  • October 4, 2019 at 6:55 pm

    This is so helpful!!! Thank you so much!!


Leave a Reply

Your email address will not be published. Required fields are marked *