# Identifying OpenGL/GLSL Version, Targeting a Dedicated GPU

**URL:** https://discourse.processing.org/t/identifying-opengl-glsl-version-targeting-a-dedicated-gpu/33273
**Category:** Processing
**Created:** [November 2, 2021, 8:28pm UTC](https://discourse.processing.org/t/identifying-opengl-glsl-version-targeting-a-dedicated-gpu/33273 "2021-11-02T20:28:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jdotson8](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jdotson8](https://discourse.processing.org/u/jdotson8)
#### Post date: [November 2, 2021, 8:28pm UTC](https://discourse.processing.org/t/identifying-opengl-glsl-version-targeting-a-dedicated-gpu/33273/1 "2021-11-02T20:28:02Z")

</div>

**OpenGL Version**

I have been working on a volume rendering project in Processing 3.3.7 that makes extensive use of custom shaders. Everything seems to be working fine on my laptop, but there are certain features that I did not expect to be supported given my understanding of the Processing OpenGL integration, and it has left me with concerns about portability on other devices.

I have read in various places online that Processing exposes an OpenGL ES2.0 interface via JOGL. To my surprise, however, I found I am able to make use of bit-wise operators in my shader code, which I understand is not supported by the ES 2.0 shading language. This prompted me to dig a little further into the processing source, and I discovered some public constants that get set on initialization in the PGraphicsOpenGL class. Printing OPENGL\_VERSION and GLSL\_VERSION yields the same result:

```auto
4.4.0 - Build 21.20.16.4550

```

This does not look like an OpenGL ES version string. On the other hand, my shader code also uses the GL\_EXT\_shader\_framebuffer\_fetch extension, which is OpenGL ES only from what I understand. What is going on?

**Dedicated GPU**

I ran into another puzzling issue while digging into these constants. My laptop has an Intel 530 integrated graphics card, and and NVidia 960M dedicated GPU. Printing OPENGL\_RENDERER yields:

```auto
Intel(R) HD Graphics 530

```

Does this mean processing isn’t using my dedicated GPU with the P3D renderer? If not, is there a way to change this configuration?

---

<div class="post-metadata">

### Author: ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)
#### Post date: [November 3, 2021, 6:31am UTC](https://discourse.processing.org/t/identifying-opengl-glsl-version-targeting-a-dedicated-gpu/33273/2 "2021-11-03T06:31:27Z")

</div>

Hi! Welcome to the forum!

for the second question, assuming windows, would manually set the GPU work? I don’t know if setting Processing’s GPU to nvidia would do it or you have to export an executable.

> **[How To Force A Program To Use Specific GPU In Windows 10](https://www.itechtics.com/use-specific-gpu/)**
>
> A lot of modern laptops come with two graphics cards, one integrated with the motherboard and the other one is a dedicated GPU. Normally, Windows can

---

<div class="post-metadata">

### Author: ![jdotson8](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jdotson8](https://discourse.processing.org/u/jdotson8)
#### Post date: [November 3, 2021, 1:30pm UTC](https://discourse.processing.org/t/identifying-opengl-glsl-version-targeting-a-dedicated-gpu/33273/3 "2021-11-03T13:30:32Z")

</div>

Thanks! This solves the GPU issue. Specifically, I needed to set the GPU for the java binary that ships with processing at /java/bin/java.exe.
