class_docstr: Class that provides a series of GL functions that do not fit
  in the object oriented part of gloo. An instance of this class is
  associated with each canvas.
docstr: Set the OpenGL viewport
  
  This is a wrapper for gl.glViewport.
  
  Parameters
  ----------
  *args : tuple
      X and Y coordinates, plus width and height. Can be passed in as
      individual components, or as a single tuple with four values.
docstr_tok: ["Set","the","OpenGL","viewport","This","is","a","wrapper","for","gl.glViewport",".","Parameters","--","--","--","--","--","*","args",":","tuple","X","and","Y","coordinates",",","plus","width","and","height",".","Can","be","passed","in","as","individual","components",",","or","as","a","single","tuple","with","four","values","."]
code: def set_viewport(self, *args):
      """Set the OpenGL viewport
  
      This is a wrapper for gl.glViewport.
  
      Parameters
      ----------
      *args : tuple
          X and Y coordinates, plus width and height. Can be passed in as
          individual components, or as a single tuple with four values.
      """
      x, y, w, h = args[0] if len(args) == 1 else args
      self.glir.command(
          "FUNC", "glViewport", int(x), int(y), int(w), int(h)
      )
  
imports: import numpy
  from copy import deepcopy
  from .None import gl
  from ..color import Color
  from ..util import logger
label_desc: Use image node_id 1 for calling the BaseGlooFunctions obj's underlying member method code with example usage: obj.set_viewport() without return types