Questions tagged [glkit]

GLKit is a high-level framework for OS X and iOS that assists with development of OpenGL and OpenGL ES apps.

The GLKit framework provides four key feature areas making it easier to develop modern OpenGL and OpenGL ES apps on OS X and iOS:

  • The GLKView and GLKViewController classes in iOS provide a standard implementation of a UIKit view that draws its content using OpenGL ES and a view controller for managing animation in that view.
  • The GLKTextureLoader class allows your app to easily load textures from a variety of sources. Textures can even be loaded asynchronously in the background with just a few lines of code.
  • Effects, in GLKBaseEffect and related classes, provide shader-based versions of common rendering techniques, analogous to features of the fixed-function pipeline in legacy OpenGL and OpenGL ES.
  • Vector, matrix, and quaternion math libraries, optimized for fast performance on Apple devices, provide functions and data types useful for graphics programming and replace features found only in legacy OpenGL and OpenGL ES versions.

See the GLKit Framework Reference for details.

436 questions
4
votes
1 answer

OpenCV + OpenGL: proper camera pose using solvePnP

I've got problem with obtaining proper camera pose from iPad camera using OpenCV. I'm using custom made 2D marker (based on AruCo library ) - I want to render 3D cube over that marker using OpenGL. In order to recieve camera pose I'm using solvePnP…
Axadiw
  • 651
  • 8
  • 19
4
votes
0 answers

CIContext drawImage is very slow

I am trying to draw a static CIImage using CIContext drawImage in the drawRect of a GLKView, however I am getting about 4 frames per second. Suggestions for improvement? // init code self.backgroundColor = UIColor.black; self.context = [[EAGLContext…
jjxtra
  • 20,415
  • 16
  • 100
  • 140
4
votes
1 answer

iOS OpenGL ES 2.0 Quaternions Rotation with Momentum after Swipe

I am learning OpenGL ES 2.0 for iOS and with the help of several tutuorials can rotate and zoom a simple sphere object using quaternions. I'd like the globe to continue rotating with diminishing speed when the user lifts their finger from the screen…
PhilBot
  • 748
  • 18
  • 85
  • 173
4
votes
1 answer

opengles display human face in iphone

I need to make a human 2D face to 3D face. I used this link to load an ".obj" file and map the textures. This example is only for cube and pyramid. I loaded a human face ".obj" file. This loads the .obj file and can get the human face properly as…
2vision2
  • 4,933
  • 16
  • 83
  • 164
4
votes
0 answers

Is there a way to use UIView / CALayer in OpenGL or Apple's GLKit without rendering to UIImage/CGImageRef?

I know how to render a UIView/CALayer to a CGContextRef and a UIImage/CGImageRef.. That is old news. But is there a way to omit the rendering to Image/CGContextRef and use the UIView/CALayer directly in OpenGL or GLKit, so that if updates happens in…
hfossli
  • 22,616
  • 10
  • 116
  • 130
4
votes
4 answers

How do I create a GLKViewController that starts in a paused state?

I create a GLKViewController like this: // Create a GLK View Controller to handle animation timings _glkVC = [[GLKViewController alloc] initWithNibName:nil bundle:nil]; _glkVC.preferredFramesPerSecond = 60; _glkVC.view =…
jhabbott
  • 18,461
  • 9
  • 58
  • 95
4
votes
1 answer

How to Setup GLKViewController Library Object with GLKView in Interface Builder NIB

{Xcode 4.4, deployment target iOS5.0, not storyboard, using ARC} I have been looking into OpenGL in iOS & I've had no problem creating the GLKViewController & GLKView programically as many tutorials show. I wanted to try using the GLKViewController…
DaveLock
  • 63
  • 6
4
votes
2 answers

How to use custom shader with GLKit

Does anyone know how to use the custom shader with GLKit? Not use the GLBaseEffect. Best Regards,
Yongwei Xing
  • 12,983
  • 24
  • 70
  • 90
3
votes
2 answers

Why is GLKView's DrawableWidth not set in ViewDidLoad?

I'm using GLKit's GLKViewController/GLKView to do some basic OpenGL drawing. I'd like to setup the ViewPort in the ViewDidLoad method. After reading the GLKView reference, I thought I'd be able to do it like this: - (void)viewDidLoad { [super…
Gabriel G. Roy
  • 2,552
  • 2
  • 27
  • 39
3
votes
0 answers

GLKTextureLoader completion handler EXEC_BAD_ACCESS issue

I am able to load a texture using the GLKTextureLoader however when i try to do it on a separate thread i get an EXEC_BAD_ACCESS issue. working code. NSError *error; GLuint textureName = self.textureImageInfo.name; glDeleteTextures(GL_TEXTURE_2D,…
Anthony McCormick
  • 2,724
  • 3
  • 25
  • 27
3
votes
2 answers

Appropriate use of GLKBaseEffect

Ahoy! I've been looking into updating some old test code in an attempt to brush up on the new features added to GLKit. So far i've managed to set up a GLKViewController and start rendering some basic shapes but have struggled to find any decent…
Zack Brown
  • 5,990
  • 2
  • 41
  • 54
3
votes
1 answer

Why is my OpenGL ES 2.0 program only drawing a line instead of a set of lines? (GLKit or OpenGL)

Ok I have checked over and over, and so far I "think" i understand how opengl is drawing and how to specify what i want to draw, however i just cant seem to make it draw more than 1 line. Using the template from Xcode 4.2 i can get the following…
Pochi
  • 13,391
  • 3
  • 64
  • 104
3
votes
1 answer

Depth testing in GLKit

I'm new to OpenGL/GLKit and having trouble with depth testing. The picture below shows a post with five beams intersecting it. They all meet in the middle (inside the post) but as you can see the parts of the beams that are meant to be obscured are…
Craig
  • 8,093
  • 8
  • 42
  • 74
3
votes
1 answer

Making a "piece of paper with text on it" in OpenGL (Specifically on iOS 5)

I've never done OpenGL, but I'm looking for some pointers on this particular question on an AR app I'm practicing with. I'd like to make an app with a "flat rectangle" along with text written on the surface of the rectangle. Visually, I'm imagining…
kurisukun
  • 3,149
  • 5
  • 37
  • 69
3
votes
1 answer

Apple Metal iOS why does GLKMatrix4MakeLookAt rock back and forth

I am developing a 3D scene on iOS 16.1 with Xcode 14.3. I have a rectangular plane orbiting the origin at an incline and I want to use GLKMatrix4MakeLookAt to cause the plane to always face the origin. I am using the code below. The plane does…
PhilBot
  • 748
  • 18
  • 85
  • 173