docstr: viewport specifies the arguments to glViewport. If None, then we use self.opts['viewport']
  region specifies the sub-region of self.opts['viewport'] that should be rendered.
  Note that we may use viewport != self.opts['viewport'] when exporting.
docstr_tok: ["viewport","specifies","the","arguments","to","glViewport",".","If","None",",","then","we","use","self.opts","[","'viewport","'","]","region","specifies","the","sub-region","of","self.opts","[","'viewport","'","]","that","should","be","rendered",".","Note","that","we","may","use","viewport","!","=","self.opts","[","'viewport","'","]","when","exporting","."]
code: def paintGL(self, region=None, viewport=None, useItemNames=False):
      """
      viewport specifies the arguments to glViewport. If None, then we use self.opts['viewport']
      region specifies the sub-region of self.opts['viewport'] that should be rendered.
      Note that we may use viewport != self.opts['viewport'] when exporting.
      """
      if viewport is None:
          glViewport(*self.getViewport())
      else:
          glViewport(*viewport)
      self.setProjection(region=region)
      self.setModelview()
      bgcolor = self.opts["bgcolor"]
      glClearColor(*bgcolor)
      glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
      self.drawItemTree(useItemNames=useItemNames)
  
imports: from OpenGL.GL import *
  import OpenGL.GL.framebufferobjects
  from math import cos, radians, sin, tan
  import numpy
  from ..None import Vector
  from ..None import functions
  from ..None import getConfigOption
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 16 for calling the GLViewMixin obj's underlying member method code with example usage: obj.paintGL(region, viewport, useItemNames) without return types