4ydx / glmenu

Modern opengl menus in golang using github.com/4ydx/gltext
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

Use of OpenGL blending creates apparent incompatibilities #1

Open jasonpfox opened 6 years ago

jasonpfox commented 6 years ago

I was trying to add menus to an existing OpenGL application and found that as soon as a menu was enabled, most of the other data layers being drawn to OpenGL buffer were lost / no longer rendered over the entire window.

If I comment out the blend-related calls in menu drawing and gltext drawing, then functionality appears to be restored with compatibility between the menus and my prior drawing code and all information being drawn to the screen.

I am not very familiar with OpenGL and do not know if there is a specific need / desire for the blending or if it would be desirable to remove the blending to increase compatibility (unless I am doing something wrong elsewhere that is hidden when not using a layer employing blending).

For my application, I also have to turn off the depth function, and with DEPTH_TEST not enabled then blending is no longer required to get text to render...

4ydx commented 6 years ago

Thanks for pointing this out. I don't believe I had tried rendering menus alongside other objects. I was treating it as an either or situation. Please be sure to update your fork so that everybody can see what it is that you did. At some point I might look into it myself.