Skip to content

Commit b590b14

Browse files
committed
Compilex with latest XCode 6.4 (6E35B) and iOS 8.4
1 parent f39f1d7 commit b590b14

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

iOSSwiftOpenGL/AppDelegate.swift

100644100755
+2-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414

1515
var window: UIWindow?
1616

17-
18-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
17+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
1918
// Override point for customization after application launch.
2019
return true
2120
}
@@ -124,7 +123,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
124123
// Returns the URL to the application's Documents directory.
125124
var applicationDocumentsDirectory: NSURL {
126125
let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)
127-
return urls[urls.endIndex-1] as NSURL
126+
return urls[urls.endIndex-1] as! NSURL
128127
}
129128

130129
}

iOSSwiftOpenGL/OpenGLView.swift

100644100755
+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class OpenGLView: UIView {
107107
func setupLayer() {
108108
// CALayer's are, by default, non-opaque, which is 'bad for performance with OpenGL',
109109
// so let's set our CAEAGLLayer layer to be opaque.
110-
self.eaglLayer = self.layer as CAEAGLLayer
110+
self.eaglLayer = self.layer as! CAEAGLLayer
111111
self.eaglLayer.opaque = true
112112
}
113113

@@ -142,10 +142,10 @@ class OpenGLView: UIView {
142142
glFramebufferRenderbuffer(GLenum(GL_FRAMEBUFFER), GLenum(GL_COLOR_ATTACHMENT0), GLenum(GL_RENDERBUFFER), self.colorRenderBuffer)
143143
}
144144

145-
func compileShader(shaderName: NSString, shaderType: GLenum) -> GLuint {
145+
func compileShader(shaderName: String, shaderType: GLenum) -> GLuint {
146146

147147
// Get NSString with contents of our shader file.
148-
var shaderPath: NSString = NSBundle.mainBundle().pathForResource(shaderName, ofType: "glsl")!
148+
var shaderPath: String! = NSBundle.mainBundle().pathForResource(shaderName, ofType: "glsl")
149149
var error: NSError? = nil
150150
var shaderString = NSString(contentsOfFile:shaderPath, encoding: NSUTF8StringEncoding, error: &error)
151151
if (shaderString == nil) {

0 commit comments

Comments
 (0)