Displaying and image with the bgl module-Help needed

Hey all!
I recently decided that I need a gui for my game to go on, since it is needed for most interactions. I know the bgui library by Moguri, but I want to build it myself so I can adapt it exactly to my needings. As I do not have any experience with OpenGL yet I use some parts of bgui as my programming basis. So here is the part of the code I use to display a plane with a texture on it. It is working, but for some reason the framerate drops to ~17 and the ram usage goes up to 6.9GB (!).
I could not find out what causes the issue, maybe it loads something every frame even though it does exist already?

Thanks!

Attachments

image test.zip (1.65 MB)