# Mesa: error: GL\_INVALID\_FRAMEBUFFER\_OPERATION in glDrawArrays

**URL:** https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022
**Category:** ParaView Support
**Created:** [July 29, 2025, 1:40pm UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022 "2025-07-29T13:40:48Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![moravveji](https://discourse.paraview.org/user_avatar/discourse.paraview.org/moravveji/32/16796_2.png) [@moravveji](https://discourse.paraview.org/u/moravveji)
#### Post date: [July 29, 2025, 1:40pm UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/1 "2025-07-29T13:40:48Z")

</div>

Hi all

I am building ParaView/5.11.2-foss-2023a module on our HPC system for our users, using [EasyBuild](https://github.com/easybuilders/easybuild-easyconfigs/blob/develop/easybuild/easyconfigs/p/ParaView/ParaView-5.11.2-foss-2023a.eb). For now, I have successfully compiled ParaView on our Intel Skylake nodes under Rocky Linux 8.9.

However, a simple ‘Sphere’ example fails to actually ‘Render()’ the sphere. Similarly, the OpenGL information query fails like this (where I have massively trimmed off repeated error messages):

```bash
>>> openGLInfo = GetOpenGLInformation()
( 702.880s) [paraview] vtkEGLRenderWindow.cxx:666 WARN| vtkEGLRenderWindow (0x5ec9df0): Unable to eglMakeCurrent: 12290
Mesa: error: GL_INVALID_ENUM in glEnable(GL_POINT_SPRITE)
( 702.881s) [paraview] vtkOpenGLState.cxx:1795 WARN| Hardware does not support the number of textures defined.
Mesa: error: GL_INVALID_ENUM in glTexImage2DMultisample(internalformat=GL_NONE)
( 702.882s) [paraview] vtkOpenGLState.cxx:1795 WARN| Hardware does not support the number of textures defined.
Mesa: error: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_NONE)
Mesa: error: 2 similar GL_INVALID_VALUE errors
Mesa: error: GL_INVALID_VALUE in glUniform1i(invalid sampler/tex unit index for uniform 0)
Mesa: error: GL_INVALID_FRAMEBUFFER_OPERATION in glDrawArrays
( 702.998s) [paraview] vtkEGLRenderWindow.cxx:666 WARN| vtkEGLRenderWindow (0x5ec9df0): Unable to eglMakeCurrent: 12290
Mesa: error: GL_INVALID_FRAMEBUFFER_OPERATION in glBlitFramebuffer(incomplete draw/read buffers)
( 702.999s) [paraview] vtkEGLRenderWindow.cxx:666 WARN| vtkEGLRenderWindow (0x5ec9df0): Unable to eglMakeCurrent: 12290

```

However, if I rebuild the same module with the same dependencies with OSMESA, then I can run the simple ‘Sphere’ example and take a screenshot of the off-screen rendering as a file. For this build, I have used the following compiler flags:

```bash
-DVTK_OPENGL_HAS_EGL=OFF \
-DVTK_USE_X=OFF \
-DVTK_USE_SDL2=OFF \
-DVTK_OPENGL_HAS_OSMESA=ON

```

Now, my question is how can I still use the nomal ParaView (i.e. without OSMESA) and yet do not get the error blow up when using `pvpython --no-mpi` for the simple ‘Sphere’ example?

Thanks in advance  
Ehsan (VSC/KU Leuven, Belgium)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [July 29, 2025, 5:59pm UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/2 "2025-07-29T17:59:51Z")

</div>

If OSMesa works, it sounds like the available OpenGL driver on the machine is not suitable.

Cc: @mwestphal @Sankhesh_Jhaveri

---

<div class="post-metadata">

### Author: ![Sankhesh\_Jhaveri](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sankhesh_jhaveri/32/3374_2.png) [@Sankhesh\_Jhaveri](https://discourse.paraview.org/u/Sankhesh_Jhaveri)
#### Post date: [July 30, 2025, 5:46pm UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/3 "2025-07-30T17:46:33Z")

</div>

Hi @moravveji, since you’ve disabled Xlib support, vtk is trying to use EGL for rendering. And it seems like the egl is coming from mesa. Have you tried installing a newer mesa?

---

<div class="post-metadata">

### Author: ![moravveji](https://discourse.paraview.org/user_avatar/discourse.paraview.org/moravveji/32/16796_2.png) [@moravveji](https://discourse.paraview.org/u/moravveji)
#### Post date: [July 31, 2025, 12:17pm UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/4 "2025-07-31T12:17:31Z")

</div>

Thanks @Sankhesh_Jhaveri for your reply.  
As the [Easybuild recipe for ParaView](https://github.com/easybuilders/easybuild-easyconfigs/blob/856e35188b9ec014cc8f95e13044e14e5d7463f9/easybuild/easyconfigs/p/ParaView/ParaView-5.11.2-foss-2023a.eb#L32) mentions, this specific version of ParaView which I am testing is built against `MESA/23.1.4-GCCcore-12.3.0`. Is that recent enough for the correct handling of EGL from MESA?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [July 31, 2025, 2:29pm UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/5 "2025-07-31T14:29:44Z")

</div>

We build with 23.1.6, so (modulo bug fixes), it looks recent enough to me.

---

<div class="post-metadata">

### Author: ![moravveji](https://discourse.paraview.org/user_avatar/discourse.paraview.org/moravveji/32/16796_2.png) [@moravveji](https://discourse.paraview.org/u/moravveji)
#### Post date: [August 1, 2025, 8:49am UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/6 "2025-08-01T08:49:01Z")

</div>

Fair enough.  
Then, back to your [earlier reply](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/3), the VTK is explicitly set to use EGL by passing `-DVTK_OPENGL_HAS_EGL=ON` to CMake. I wonder if this is sufficient go get VTK working properly in `pvpython`?

Furthermore, I realized that the simple sphere example can be executed directly like `paraview --no-mpi --script sphere.py`, and this one succeeds. Hence, I did not require `pvpython` for this. But, I wonder now whether `paraview --script` can fully replace using `pvpython`? In other words, are there still feature differences between the two?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 4, 2025, 12:31pm UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/7 "2025-08-04T12:31:20Z")

</div>

> [@moravveji](#):
>
> I wonder if this is sufficient go get VTK working properly in `pvpython`?

yes

> I wonder now whether paraview --script can fully replace using pvpython? In other words, are there still feature differences between the two?

`paraview --script` run ParaView (the Qt interface) then run a python script. pvpython run a python script. the pvpython approach is much much lighter.

---

<div class="post-metadata">

### Author: ![moravveji](https://discourse.paraview.org/user_avatar/discourse.paraview.org/moravveji/32/16796_2.png) [@moravveji](https://discourse.paraview.org/u/moravveji)
#### Post date: [August 4, 2025, 1:48pm UTC](https://discourse.paraview.org/t/mesa-error-gl-invalid-framebuffer-operation-in-gldrawarrays/17022/8 "2025-08-04T13:48:09Z")

</div>

Indeed, using `pvpython` is supposed to be much lighter (if I manage to get it working).

Anyhow, I do not see this discussion resulting in any solution or suggestion that I can try out. Seems like the version of Mesa is sufficiently recent and the compilation flags are properly passed. So, nothing more to experiment in that regard.

Still, I would appreciate if you guys have any suggestion for me to fix this VTK/EGL issue which is only raised in `pvpython` and not with `paraview` itself.  
If our hands are empty, I shall close this thread.
