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
0
votes
1 answer

GLKQuaternion's not accessing w variable properly

I'm trying to figure out an odd issue with GLKQuaternions. When attempting to print out the information for the Quaternions, the value for w = 0 every time. Although, in the debugger area, it clearly shows that -4.37114e-08 is stored in this value.…
TheCodingArt
  • 3,436
  • 4
  • 30
  • 53
0
votes
2 answers

How to draw inside a view in a UIScrollView or UIViewVontroller?

I want to implement a signature feature in my tabbar application. I want to add a subView to a UIScrollView or UIViewController (which ever is the more appropriate and easier). Which control should I use for it? I want to pick the touch events on…
Khawar Ali
  • 3,462
  • 4
  • 27
  • 55
0
votes
2 answers

Why isn't this texture repeating in iOS OpenGL ES 2.0?

I have a class which renders a textured 2D shape onto the screen in iOS. If I use texture coordinates less than 1.0, the texture scales appropriately to match the coordinates. However, if I use texture coordinates of more than 1.0, the texture…
Andy Mills
  • 135
  • 2
  • 13
0
votes
1 answer

Add some views before displaying GLkit View - Navigate to GLkit View from a UIview

I am making a basic application in opengles, and I started with "raywenderlich" Glkit tutorial. This displays a cube in the starting screen of the app. And he mentioned the below lines in his tutorial to do this. To make this Storyboard run on…
2vision2
  • 4,933
  • 16
  • 83
  • 164
0
votes
0 answers

Rotate an image and get back to its original position - opengles glkit

I need to rotate an image in opengles GLkit and get it back to its original position in GLkit. rotation += 5; _modelViewMatrix = GLKMatrix4Rotate( _modelViewMatrix, GLKMathDegreesToRadians(5), 1, 0, 0); _modelViewMatrix = GLKMatrix4Rotate(…
Manoj
  • 3,947
  • 9
  • 46
  • 84
0
votes
1 answer

Load a two texture for a single image at a regular interval of time - GLkit openglES

I used the below code to load the texture on a object. - (void)ldText:(UIImage *)Image { glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); …
Manoj
  • 3,947
  • 9
  • 46
  • 84
0
votes
0 answers

GLKits equivalent for CreateFromVectors()

I would like to know what (if there is) is the equivalent of CreateFromVectors() for GLKit. I can't see that idea being left out since it plays such a great feature in 3D graphical programming. I'm trying to convert the following to Objective-C from…
TheCodingArt
  • 3,436
  • 4
  • 30
  • 53
0
votes
1 answer

Looking for an example of controls (buttons, sliders, etc...) using GLKit

I need to add simple controls (buttons, sliders, etc...) to a GLKView, which recognize gestures, and send an action to a GLKViewController. These controls will be used to add animated, partially transparent menus & buttons to a game I am making…
firyice
  • 527
  • 7
  • 24
0
votes
2 answers

How to get a cube having different textured image on each face of cube in glkit?

I am developing a game in which i have to shake a dice to get number .I am using glkit to make a cube and texturing that cube by GLKBaseEffect. Well ! i want a cube having diffrent textured images on each faces so that it can simulates a dice. I…
0
votes
1 answer

Render to texture using a frame buffer and GLKit's GLKBaseEffect

I'm trying to draw to a texture (and then use that texture on an object) with GLKit but I'm receiving GL ERROR: 0x0502 which I think it means invalid value passed to a function. The thing is, the error is fired somewhere inside the effects…
Meda
  • 2,776
  • 4
  • 20
  • 31
0
votes
1 answer

Record GLKView to mov file with CVOpenGLESTextureCache

i'm new to opengl and i'm trying to record the GLKView with no luck so far. here is my code: EAGLContext * _context = self.glkview.context; #if COREVIDEO_USE_EAGLCONTEXT_CLASS_IN_API CVReturn err =…
Janub
  • 1,594
  • 14
  • 26
0
votes
1 answer

Is there a way to prevent GLKView from clearing the context before calling drawRect:?

I would like to add content to my canvas without clearing and redrawing the content I've previously drawn. Is that possible? Right now I re-draw all the content every time drawRect: gets called and it time, that makes things sluggish.…
Meda
  • 2,776
  • 4
  • 20
  • 31
0
votes
1 answer

Hide parts of image in OpenGL ES

I'm using GLKView to render some sprites in a iOS app. My question is, how can I remove/draw only parts of one image? For example, I have a background, and on top of it an image (both sprites). I want to take some random rectangles out of the image…
Antonio MG
  • 20,382
  • 3
  • 43
  • 62
0
votes
1 answer

Rotating a matrix with roll/pitch/yaw

I want to apply some real-world transformation (from accelerometer/gyroscope/compass) to my model-view matrix. This way: modelViewMatrix = GLKMatrix4MakeLookAt(cam.x, cam.y, cam.z, 0.f, 0.f, 0.f, …
Dmitry Isaev
  • 3,888
  • 2
  • 37
  • 49
0
votes
2 answers

Why do vertices appear white instead of the colour in the vertex buffer?

I've created 3 buffers to separate vertex position, colour and index data. The vertices correctly render as a square but it's white instead of the colour defined in the array dynamicVertexData. I'm using OpenGL ES 2.0, but I assume I'm making a…
invisible squirrel
  • 2,968
  • 3
  • 25
  • 26