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
5
votes
3 answers

GLKit's -drawRect: is not called during screen rotation

I have GLKit-based app with some simple object displayed. All works fine, except screen rotation, during which GLKView is not updated (-drawRect: is not called). So during rotation projection matrix is not updated according to dynamically changing…
kpower
  • 3,871
  • 4
  • 42
  • 62
5
votes
2 answers

Arcball Rotation with Quaternions (using iOS GLKit)

I'm looking for a simple implementation for arcball rotation on 3D models with quaternions, specifically using GLKit on iOS. So far, I have examined the following sources: Arcball rotation with GLKit How to rotate a 3D object with touches using…
Ricardo RendonCepeda
  • 3,271
  • 4
  • 23
  • 30
5
votes
2 answers

Performance: Quartz2D vs OpenGL ES (GLKit)

I'm working on a project where you can draw on the screen using touch. I thought of using OpenGL for it, however I came across two examples; one using OpenGL and the other using Quartz2D. Example project from Apple, GLPaint, using OpenGL Example…
Jeroen de Leeuw
  • 907
  • 1
  • 9
  • 18
5
votes
2 answers

Convert GLKMatrix4 and CATransform3D

Is there a way to cast from CATransform3D to GLKMatrix4, or do I always need to manually convert them from value to value? I guess casting would be faster.
zalavari
  • 819
  • 9
  • 21
5
votes
2 answers

IOS : UIScrollView and OpenGL

So I have a OpenGL(glView) view that is rendering a menu which I aim to scroll. I was trying to avoid reinventing the UIScrollView and so I have place a scrollview on top of the glView. The issue is that scrolling the scrollview pauses the…
Burf2000
  • 5,001
  • 14
  • 58
  • 117
5
votes
1 answer

How to use custom shaders together with GLKit

I keep reading how wonderfully easy it is to work with GLKit and your own custom shaders. But, so far, I have failed to find any information on how to actually do it. How can I take my own shader and "plug it in" into existing GLKit project?
Błażej Czapp
  • 2,478
  • 2
  • 24
  • 18
4
votes
3 answers

Handle multiple meshes in Open GL ES 2.0 (iOS GLKit)?

I've managed to create a single mesh in Open GL ES 2.0 using iOS's GLKit. What I can't figure out is how to create a second mesh that looks identical to the first except with a different position. I think what would be most helpful would be if…
ArtOfWarfare
  • 20,617
  • 19
  • 137
  • 193
4
votes
1 answer

Automatically calculate normals in GLKit/OpenGL-ES

I'm making some fairly basic shapes in OpenGL-ES based on sample code from Apple. They've used an array of points, with an array of indices into the first array and each set of three indices creates a polygon. That's all great, I can make the shapes…
Craig
  • 8,093
  • 8
  • 42
  • 74
4
votes
2 answers

Nested GLKView and GLKViewController

I'm new to OpenGL ES and I'm experimenting with GLKit. My goal is to develop a very simple app just to get a good feel of OpenGL. I started with Apple's sample code (OpenGL ES game) and I implemented basic gesture controls: panning, zooming,…
Vince
  • 220
  • 2
  • 9
4
votes
1 answer

GLKit & adding tints to textures

I am having issue with tinting a PNG image with GLKit. I have a white PNG image that I load into the application and then use it to create a texture: UIImage *image = [ UIImage imageNamed:@"brushImage" ]; NSError *error = nil; texture_m = [[…
reza23
  • 3,079
  • 2
  • 27
  • 42
4
votes
1 answer

GLKit vs. Metal perspective matrix difference

I'm reading a Metal tutorial on raywenderlich.com, where it introduces a pure Swift float4x4 helper class. 99% it's just wrapper around GLKit functions, except one function which really puzzles me: static func makePerspectiveViewAngle(_…
hyperknot
  • 13,454
  • 24
  • 98
  • 153
4
votes
1 answer

Swift - GLKit View CIFilter Image

I am trying to use a GLIKit View in order to modify an Image. The class I have so far is working well all the CIFilters except for the CILineOverlay it renders a black view. If I use any other effect it works well. Why is the CILineOverlay not…
SNos
  • 3,430
  • 5
  • 42
  • 92
4
votes
1 answer

Create smoother edges or otherwise fix jagged edges on box in SCNView?

The code below generates a red box in a SCNView. However, the edges are jagged along the top and bottom of the side/element facing you (as illustrated by the attachment). The goal is to render smoother edges similar to Minecraft boxes. Changing the…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
4
votes
0 answers

GLKTextureLoaderErrorDomain error 12

i am coding a 3d model viewer. but i can't have the texture. everytime i try to run this code: NSDictionary *options = @{ GLKTextureLoaderSRGB : @YES }; NSError *error; NSString *path = [[NSBundle mainBundle] pathForResource:@"1"…
user3812138
  • 261
  • 4
  • 11
4
votes
2 answers

Scene Kit - Dragging an Object

I’m trying to drag a chess piece with the mouse/trackpad using Scene Kit. All objects (board and pieces) are children of the root node, loaded from a Collada file. I found a helpful description of the process elsewhere on Stack Overflow. Using that…
1 2
3
29 30