title: Drawing transparent subsurfaces (windows) in PyOpenGL?
body: <p>I have a simple PyOpenGL program that draws a cube. I am attempting to draw a transparent subsurface (window) on the front face of the cube. I can get both surfaces to show up, but not in the way that represents a window.</p>
  
  <p>Here is my code for drawing the cube:</p>
  
  <pre><code>    # Draws the six faces of a cube
  def DrawCube(self):
      # Front face - Blue
      glPushName(1)
      glBegin(GL_QUADS)
      glColor4f(0.0, 0.0, 1.0, 1.0)
      glNormal3f(0.0, 0.0, 1.0) # Allows for light to reflect off certain parts of surface
      glVertex3f(1.0, 0.0, 0.0)
      glVertex3f(1.0, 1.0, 0.0)
      glVertex3f(1.0, 1.0, 1.0)
      glVertex3f(1.0, 0.0, 1.0)
      glEnd()
  
      # Back face - Green
      glPushName(2)
      glBegin(GL_QUADS)
      glColor4f(0.0, 1.0, 0.0, 1.0)
      glNormal3f(0.0, 0.0,-1.0)
      glVertex3f(0.0, 0.0, 0.0)
      glVertex3f(0.0, 1.0, 0.0)
      glVertex3f(0.0, 1.0, 1.0)
      glVertex3f(0.0, 0.0, 1.0)
      glEnd()
  
      # Left face - Red
      glPushName(3)
      glBegin(GL_QUADS)
      glColor4f(1.0, 0.0, 0.0, 1.0)
      glNormal3f(-1.0,0.0, 0.0)
      glVertex3f(0.0, 0.0, 0.0)
      glVertex3f(1.0, 0.0, 0.0)
      glVertex3f(1.0, 0.0, 1.0)
      glVertex3f(0.0, 0.0, 1.0)
      glEnd()
  
      # Right face - Orange
      glPushName(4)
      glBegin(GL_QUADS)
      glColor4f(1.0, 0.55, 0.0, 1.0)
      glNormal3f(1.0, 0.0, 0.0)
      glVertex3f(1.0, 1.0, 0.0)
      glVertex3f(1.0, 1.0, 1.0)
      glVertex3f(0.0, 1.0, 1.0)
      glVertex3f(0.0, 1.0, 0.0)
      glEnd()
  
      # Top face - White
      glPushName(5)
      glBegin(GL_QUADS)
      glColor4f(1.0, 1.0, 1.0, 1.0)
      glNormal3f(0.0, 1.0, 0.0)
      glVertex3f(0.0, 0.0, 1.0)
      glVertex3f(1.0, 0.0, 1.0)
      glVertex3f(1.0, 1.0, 1.0)
      glVertex3f(0.0, 1.0, 1.0)
      glEnd()
  
      # Bottom face - Yellow
      glPushName(6)
      glBegin(GL_QUADS)
      glColor4f(1.0, 1.0, 0.0, 1.0)
      glNormal3f(0.0,-1.0, 0.0)
      glVertex3f(0.0, 0.0, 0.0)
      glVertex3f(0.0, 1.0, 0.0)
      glVertex3f(1.0, 1.0, 0.0)
      glVertex3f(1.0, 0.0, 0.0)
      glEnd()
  
      # Window on Front (Blue) Face
      glPushName(7)
      glBegin(GL_QUADS)
      glColor4f(0.0, 1.0, 1.0, 0.4)
      glNormal3f(0.0, 0.0, 1.0)
      glVertex3f(1.0, 0.25, 0.25)
      glVertex3f(1.0, 0.75, 0.25)
      glVertex3f(1.0, 0.75, 0.75)
      glVertex3f(1.0, 0.25, 0.75)
      glEnd()
  </code></pre>
  
  <p>Here is the result of what I'm drawing.
  <img src="https://i.stack.imgur.com/1VH7I.png" alt="Cube Rendering"></p>
  
  <p>I want to make the window completely transparent so you can see through to the other side of the cube. How do I do this?</p>