# GLMakie. How to choose a specific GPU?

**URL:** <https://discourse.julialang.org/t/glmakie-how-to-choose-a-specific-gpu/98557>\
**Category:** Visualization\
**Tags:** gpu, glmakie\
**Created:** [May 9, 2023, 2:38pm UTC](https://discourse.julialang.org/t/glmakie-how-to-choose-a-specific-gpu/98557 "2023-05-09T14:38:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fedoroff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fedoroff/32/53209_2.png) [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Post date:** [May 9, 2023, 2:38pm UTC](https://discourse.julialang.org/t/glmakie-how-to-choose-a-specific-gpu/98557/1 "2023-05-09T14:38:14Z")

</div>

If I’m using GLMakie on a system with multiple GPUs, how can I select a specific GPU unit for rendering?

---

<div class="post-metadata">

**Author:** ![math4mad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/math4mad/32/49486_2.png) [@math4mad](https://discourse.julialang.org/u/math4mad)\
**Post date:** [May 9, 2023, 3:59pm UTC](https://discourse.julialang.org/t/glmakie-how-to-choose-a-specific-gpu/98557/2 "2023-05-09T15:59:47Z")

</div>

**GLMakie** using OpenGL as backend, as far as I know it’s not based on GPU.

> [GLMakie](https://github.com/MakieOrg/Makie.jl/tree/master/GLMakie) is the native, desktop-based backend, and is the most feature-complete. It requires an OpenGL enabled graphics card with OpenGL version 3.3 or higher.

if you want to use GPU as backend , you can use **WGLMakie**

> [WGLMakie](https://github.com/MakieOrg/Makie.jl/tree/master/WGLMakie) is the web-based backend, which is mostly implemented in Julia right now. WGLMakie uses [JSServe](https://github.com/SimonDanisch/JSServe.jl) to generate the HTML and JavaScript for displaying the plots. On the JavaScript side, we use [ThreeJS](https://threejs.org/)and [WebGL](https://de.wikipedia.org/wiki/WebGL) to render the plots.

**WebGL** unify all GPU source.

---

<div class="post-metadata">

**Author:** ![fedoroff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fedoroff/32/53209_2.png) [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Post date:** [May 9, 2023, 4:08pm UTC](https://discourse.julialang.org/t/glmakie-how-to-choose-a-specific-gpu/98557/3 "2023-05-09T16:08:40Z")

</div>

Hm… but

> It requires an OpenGL enabled graphics card

means that you need GPU.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 9, 2023, 4:09pm UTC](https://discourse.julialang.org/t/glmakie-how-to-choose-a-specific-gpu/98557/4 "2023-05-09T16:09:08Z")

</div>

No, GLMakie uses the GPU via OpenGL…  
OpenGL is global state based, so you need to use your OS + driver to switch gpus.  
I don’t know any good tutorial explaining this for every OS, but I think if you google how to start OpenGL on a specific GPU for a certain process, you should get good results.

---

<div class="post-metadata">

**Author:** ![math4mad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/math4mad/32/49486_2.png) [@math4mad](https://discourse.julialang.org/u/math4mad)\
**Post date:** [May 9, 2023, 4:12pm UTC](https://discourse.julialang.org/t/glmakie-how-to-choose-a-specific-gpu/98557/5 "2023-05-09T16:12:46Z")

</div>

Yeah! Thanks
