I’ve seen both EAGLView and GLKView used in iOS applications. What’s the difference between them?
I’ve seen both EAGLView and GLKView used in iOS applications. What’s the difference between
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Both of these classes are related to OpenGL ES, but only one of them is actually supplied by Apple as part of the iOS SDK.
EAGLViewis not a class provided with the Cocoa Touch frameworks. In Apple’s OpenGL ES templates and sample code, they’ve created classes with this name that host OpenGL ES content. Others have copied and pasted these classes in the tutorials they’ve written about the subject. Generally, the one element all of the classes with this name have in common is that they override the+layerClassmethod to return[CAEAGLLayer class], indicating that these views will host OpenGL ES content within their backing layer.GLKViewis new in iOS 5.0 as part of the GLKit framework. GLKit aims to simplify some of the setup required for displaying OpenGL ES material by providing helper classes like GLKView. GLKView handles setup of framebuffers and render buffers for you, as well as some of the other tasks you normally have to write code for.You might not see this class being used much in tutorials, given that many of them were written before iOS 5.0, but this is a handy helper class that can simplify iOS OpenGL ES rendering.