# Transparent OpenGL Component

**URL:** <https://forum.juce.com/t/transparent-opengl-component/16760>\
**Category:** General JUCE discussion\
**Created:** [February 22, 2016, 3:53pm UTC](https://forum.juce.com/t/transparent-opengl-component/16760 "2016-02-22T15:53:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)\
**Post date:** [February 22, 2016, 3:53pm UTC](https://forum.juce.com/t/transparent-opengl-component/16760/1 "2016-02-22T15:53:35Z")

</div>

I created a class for "transparent" OpenGL components.

Probably more folks would want something like this - so here it is:

https://gist.github.com/yairchu/50f8d2deb5a5cc9ef764

It has some limitations - doesn't check if the background changed etc.

Questions and review comments most welcome :)

Cheers, Yair

---

<div class="post-metadata">

**Author:** ![goodhertz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/goodhertz/32/74_2.png) [@goodhertz](https://forum.juce.com/u/goodhertz)\
**Post date:** [October 15, 2016, 12:17am UTC](https://forum.juce.com/t/transparent-opengl-component/16760/2 "2016-10-15T00:17:54Z")

</div>

Thanks very much for posting this!

Not sure what we’re doing incorrectly, but about half of the time, the color for our openGL rendering is altered in some seemingly random way, though the background always appears to be drawn correctly.

Commenting out `backgroundTexture.bind();` fixes the openGL drawing (though obviously, the background is no longer visible).

Does this work consistently for you with multiple components?

---

<div class="post-metadata">

**Author:** ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)\
**Post date:** [October 16, 2016, 8:44am UTC](https://forum.juce.com/t/transparent-opengl-component/16760/3 "2016-10-16T08:44:10Z")

</div>

> [@hguthertz](#):
>
> Does this work consistently for you with multiple components?

Haven’t tried using several of these, in my product (SurferEQ2) there’s only one such component being used.
