Posts

Showing posts with the label opengl

Qt GLWidget how to draw text

Qt GLWidget how to draw text before I used Qt and customized my own Widget which is inherits from QGLWidget i used OpenGl in standard projects and free glut. by doing this, I used glutBitmapChracter but now in Qt there is no need to manage windows because I created customize widget with gui. so how can I draw text on the widget? if I want to include the free glut and use glutBitmapCharacter I nedd also to init the glut and im getting confused? is there any other way or do I have to use external library? Qt Docs – Asaq Jul 1 at 13:18 1 Answer 1 You are using a QGLWidget and want to draw 2D text on top of the 3D scene? glutBitmapCharacter should still work in a QGLWidget, just like other GL library code. I do not think you need to call glutInit to use the ...

OpenGL Application makes Xorg leaks

OpenGL Application makes Xorg leaks I am working on a rather big Qt5/OpenGL application. Each time the application run and exit on a linux with nvidia driver, with a compositor active , nvidia-smi shows an increase of 4Mb of VRAM usage for Xorg process. My suposition would be that even if my application leaks, everything should be released when it is destroyed, but it does not seems to be the case. On this thread OpenGL GPU Memory cleanup, required?, Someone mentionned that it would not be the case if "Display list" are shared. I do not know much about OpenGL, and could not find coherent informations about this issue on the web. My objective is to understand how this could happen, where it may come from in my code and how to fix it. Note : The leaks are present in Xorg after my Aplication is stopped and no other process then Xorg and Desktop Environnement related are shown in nvidia-smi The DE I use does not matter (tested : KDE, Lxde, OpenBox, Gnome, Unity). The Linux Distri...