 import GLKit
 
 final class TeaPotView: UIView {
-  var backingWidth: GLint = 0
-  var backingHeight: GLint = 0
-  
-  var viewRenderbuffer: GLuint = 0
-  var viewFramebuffer: GLuint = 0
-  var depthRenderbuffer: GLuint = 0
-  
   private let context = EAGLContext(API: .OpenGLES1)
   
+  private var backingWidth: GLint = 0
+  private var backingHeight: GLint = 0
+  
+  private var viewRenderbuffer: GLuint = 0
+  private var viewFramebuffer: GLuint = 0
+  private var depthRenderbuffer: GLuint = 0
+  
+  private let fieldOfView: GLfloat = 60
+  private let zFar: GLfloat  = 1000
+  private let zNear: GLfloat = 0.1
+  private let scale: GLfloat = 3
+
   private var eaglLayer: CAEAGLLayer {
     return self.layer as! CAEAGLLayer
   }

    glClear(GLenum(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT))
    
    glLoadIdentity()
    glTranslatef(0, -0.1, -1)
    glScalef(3, 3, 3)

    for teapot_indices in teapot_indicies {
      glDrawElements(GLenum(GL_TRIANGLE_STRIP), GLsizei(teapot_indices.count), GLenum(GL_UNSIGNED_SHORT), teapot_indices)

    }
    self.lastViewportUpdateSize = self.bounds.size
    
    let size = zNear * GLfloat(tan(Double(self.fieldOfView) / 180 * M_PI_2))
    let sizeByRatio = size / GLfloat(self.bounds.size.width / self.bounds.size.height)
    
    glFrustumf(-size, size, -sizeByRatio, sizeByRatio, self.zNear, self.zFar)
    glViewport(0, 0, GLsizei(self.bounds.size.width), GLsizei(self.bounds.size.height))
    
    // Make the OpenGL modelview matrix the default
    glMatrixMode(GLenum(GL_MODELVIEW))
