I cant get openGL ES to work in swift

Greetings,

I have recently learnt swift. I'm an openGL developer on the desktop and am will be working on IOS projects. I was looking to get openGL ES (which I have used before in objective-C) to work in swift, and quickly realized that the sample apple code was unfinished and broken to say the least. I also noticed that there seemed to be no information on how to use openGL ES in swift. So I turn to the community to see if anyone would know anything about this subject or where I could find documentation or guides on it.


Many thanks in advance,

C-H

Answered by OOPer in 24385022

I don't use OpenGL ES in my daily job, so cannot be much help of you.


But I can tell you that Xcode 7 beta contains a runnable OpenGL ES app template.

If your app is planned to be released a couple of months or more later, Xcode 7 is strongly expected to be GM until then. So start developing with Xcode 7 beta today may not be a bad thing.

(As you know, you cannot submit your app built with beta versions of Xcode.)


Or you can find some sample codes of OpenGL ES usage in Swift, if you search hard on the web.


And one more, even now, many iOS related documents or sample codes contain only Objective-C code, you may need to learn some basics about converting Objective-C to Swift.

PS: I feel like I should also mention that I am aware of the existence of other graphics API. As far as metal goes, the lack of simulator support is definitely one of its big downsides, (as well as having to learn a new API). I also would prefer not to use one of the high level APIs like spriteKit because of my background (and thus pre-existing knowledge) in hardware accelerated graphics, as well as the lack of full control over graphics code and reduced power. Thanks.

Accepted Answer

I don't use OpenGL ES in my daily job, so cannot be much help of you.


But I can tell you that Xcode 7 beta contains a runnable OpenGL ES app template.

If your app is planned to be released a couple of months or more later, Xcode 7 is strongly expected to be GM until then. So start developing with Xcode 7 beta today may not be a bad thing.

(As you know, you cannot submit your app built with beta versions of Xcode.)


Or you can find some sample codes of OpenGL ES usage in Swift, if you search hard on the web.


And one more, even now, many iOS related documents or sample codes contain only Objective-C code, you may need to learn some basics about converting Objective-C to Swift.

Thank you @OOPer for your swift responce.

I will check out the Xcode 7 beta and see what i can make of the sample code. As far as objective-C goes, yea, i used to code in objective-C, but the project I will be working on is a swift only project, for future compatibility. Once again, thank you for answering so fast, very much apreciated.

I cant get openGL ES to work in swift
 
 
Q