def render(self):
     """Must be called each frame"""
     if not GLX.glXMakeCurrent(self.xdisplay, self.x_window_id, self.context):
         print("failed")
     GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
     #todo
     GL.glBegin(GL.GL_TRIANGLES)
     GL.glIndexi(0)
     GL.glColor3f(1.0, 0.0, 0.0)
     GL.glVertex2i(0, 1)
     GL.glIndexi(0)
     GL.glColor3f(0.0, 1.0, 0.0)
     GL.glVertex2i(-1, -1)
     GL.glIndexi(0)
     GL.glColor3f(0.0, 0.0, 1.0)
     GL.glVertex2i(1, -1)
     GL.glEnd()
     self.app.render_loop()
     GLX.glXSwapBuffers(self.xdisplay, self.x_window_id)
     self.profiler_window.one_frame_passed()
     return True