# Handling Opengl error Out of memory

**URL:** https://discourse.vtk.org/t/handling-opengl-error-out-of-memory/3972
**Category:** Support
**Created:** [August 13, 2020, 4:15pm UTC](https://discourse.vtk.org/t/handling-opengl-error-out-of-memory/3972 "2020-08-13T16:15:21Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![gpu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/e47c2d/32.png) [@gpu](https://discourse.vtk.org/u/gpu)
#### Post date: [December 21, 2023, 3:33am UTC](https://discourse.vtk.org/t/handling-opengl-error-out-of-memory/3972/22 "2023-12-21T03:33:40Z")

</div>

> [@jaswantp](#):
>
> No, VTK does not use Vulkan.

any plan to add Vulkan into VTK?🙂

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [December 21, 2023, 5:39am UTC](https://discourse.vtk.org/t/handling-opengl-error-out-of-memory/3972/23 "2023-12-21T05:39:44Z")

</div>

When I recreated all objects for each rendering then after about 7500 renderings my display went dark for a second and the application crashed. It looked like a graphics driver crash. It would be hard to tell if this is the fault of VTK or the driver, maybe both. If you want to know the answer then you can rerun the test application thousands of times with different inputs, varying what is performed in each iteration and what is only done once, run everything in debug mode, try it on many different computers, etc.

I tried not recreating the render window, renderer, and volume actor for each iteration and I had no problem at all even after hundreds of thousands of renderings. Rendering time was also about 10x faster.

---

<div class="post-metadata">

### Author: ![gpu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/e47c2d/32.png) [@gpu](https://discourse.vtk.org/u/gpu)
#### Post date: [December 21, 2023, 5:54am UTC](https://discourse.vtk.org/t/handling-opengl-error-out-of-memory/3972/24 "2023-12-21T05:54:05Z")

</div>

thanks! what error do you get? OpenGL 1285 Out of memory?  
[OpenGL Error - OpenGL Wiki (khronos.org)](https://www.khronos.org/opengl/wiki/OpenGL_Error#Catching_errors_(the_easy_way))  
after add this callback, i got:  
GL CALLBACK: \*\* GL ERROR \*\* type = 0x824c, severity = 0x9146, message = GL\_OUT\_OF\_MEMORY error generated. Failed to allocate memory for texture.

is there allocated Res not free, then after many loops, OpenGL reach some Limit, eg. sth like maxMemoryAllocationCount in Vulkan which limit the allocations simultaneously exist. Or some Bindless Textures?

---

<div class="post-metadata">

### Author: ![gpu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/e47c2d/32.png) [@gpu](https://discourse.vtk.org/u/gpu)
#### Post date: [December 21, 2023, 5:55am UTC](https://discourse.vtk.org/t/handling-opengl-error-out-of-memory/3972/25 "2023-12-21T05:55:04Z")

</div>

what platform did you test on? Windows?Linux? nvdia GPU?

---

<div class="post-metadata">

### Author: ![gpu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/e47c2d/32.png) [@gpu](https://discourse.vtk.org/u/gpu)
#### Post date: [December 21, 2023, 6:01am UTC](https://discourse.vtk.org/t/handling-opengl-error-out-of-memory/3972/26 "2023-12-21T06:01:00Z")

</div>

> [@lassoan](#):
>
> different inputs

why do you suspect ‘inputs’? i remember even recreate the MetaReader each Loop BUT with the same dataFileName the result is also crash…

[Previous page](https://discourse.vtk.org/t/handling-opengl-error-out-of-memory/3972.md?page=1)
