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

OpenGL ES 2.0 draw simple triangle not showing anything

I am completely out of ideas. I have the OpenGL ES 2.0 Programming Guide book, I have Apple's template OpenGL ES 2.0 code, I have followed this page: http://open.gl/drawing I can't seem to get a simple triangle drawn, I am not sure what I am doing…
Zhang
  • 11,549
  • 7
  • 57
  • 87
3
votes
2 answers

different texture on each GLKit cube face

I am using GL Kit to draw a cube which rotates on the screen. I have this working very well with the same texture drawn on each face. I would like to draw a different texture on each face. This is currently how my code draws the cube (note that…
MarkV309
  • 51
  • 5
3
votes
1 answer

GLPaint with GLKit: flickering when drawing

I'm having a problem with GLKit in a project that is similar to GLPaint. First of all, I'm not using GLKViewController, but only a GLKView which is added to my class. My problem is that when I draw in my GLKView, the content flickers. It looks as…
ebp
  • 61
  • 4
3
votes
2 answers

cicontext drawImage:inRect:fromRect crashes in ios6

I'm trying to get an video from camera and render it using CoreImage and OpenGL. When I'm running it I see my picture on screen as I expect and then I get EXEC_BAD_ACCESS. I'm using ARC. iOS6 Beta1. Please help me to fix it. Update: it works in 5.1…
Seify
  • 312
  • 2
  • 10
3
votes
2 answers

How to use GLKMathUnproject

I've created a simple 3D world using GLKit. I'm trying to find a specific point in my 3D world based on a screen tap. It seems that I would want to use GLKMathUnproject. The signature of the method is: GLKVector3 GLKMathUnproject ( GLKVector3…
Tylerc230
  • 2,883
  • 1
  • 27
  • 31
3
votes
2 answers

GLKBaseEffect prepareToDraw GL ERROR: 0x0501

So ive been doing some iphone development with some OpenglES in it, but i am getting a rather weird error when i call prepareToDraw on my effect. My program in short simulates dice rolling (trying to learn objective-c and opengl). The program works…
Fonix
  • 11,447
  • 3
  • 45
  • 74
3
votes
1 answer

OpenGL ES 2.0 GLKit GL_LINE_SMOOTH error

I'm using drawing a glDrawArrays to draw a GL_LINE_STRIP and want to make them smooth. I've seen on a couple questions here people recommend using glEnable(GL_LINE_SMOOTH) and glHint(GL_LINE_SMOOTH_HINT, GL_NICEST), but when I do so, I'm getting an…
prplehaze
  • 459
  • 4
  • 15
3
votes
1 answer

GLKit blend two textures

I'm trying to convert OGL ES 1.1. code to GLKit. GLKit offers a pair of texture slots: texture2d0 texture2d1 Each texture has an env mode: GLKTextureEnvModeReplace, GLKTextureEnvModeModulate, GLKTextureEnvModeDecal Normally, you leave texture2d1…
Adam
  • 32,900
  • 16
  • 126
  • 153
2
votes
1 answer

GLKit Memory Leak copywithZone

Running the instruments utility against the game I'm writing shows a bunch of memory leaks related to copy with Zone when I cycle through an array and draw some simple cube objects. Im not sure the best way to track this down as I'm new to OpenGL…
TommyT39
  • 117
  • 2
  • 11
2
votes
1 answer

How would I generate a model view matrix using GLKit's GLKMatrixStack library?

There is a header file in GLKit with the following comment: GLKMatrixStack is a CFType that allows for the creation of a 4x4 matrix stack similar to OpenGL's matrix stack. Any number of matrix stacks can be created and operated on with functions…
Scott Hyndman
  • 923
  • 1
  • 7
  • 15
2
votes
0 answers

GLKBaseEffect prepareToDraw Performance

I want to render many objects with the same effect. So I change the transform property and call preparetodraw, e.g. GLKMatrix4 baseModelViewMatrix = GLKMatrix4MakeTranslation(0.0f, position, -1.0f); self.effect.transform.modelviewMatrix =…
OptimisticMonkey
  • 538
  • 4
  • 13
2
votes
1 answer

Using GL_POINTS in GLKit (iOS 5)

New with OpenGL, I am successfully displaying lines using GLKit on iOS 5 with GL_LINE_LOOP, but displaying points with GL_POINTS is giving me trouble. Specifically, I am unable to display anything but a single pixel. I've scoured the web with no…
atheaos
  • 721
  • 2
  • 7
  • 16
2
votes
0 answers

GLKViewController defined in storyboard added with addChildViewController won't update

I have defined a GLKViewController in a storyboard with an identifier. I add it to another view controller in code with sceneController = (SceneController*)[[self storyboard]…
ahwulf
  • 2,584
  • 15
  • 29
2
votes
1 answer

iOS: Questions about camera information within GLKMatrix4MakeLookAt result

The iOS 5 documentation reveals that GLKMatrix4MakeLookAt operates the same as gluLookAt. The definition is provided here: static __inline__ GLKMatrix4 GLKMatrix4MakeLookAt(float eyeX, float eyeY, float eyeZ, …
KomodoDave
  • 7,239
  • 10
  • 60
  • 92
2
votes
2 answers

Combining GLKView with UIBUtton

I'm looking for a sample application that uses Apple's new GLKView object whith other UIObjects like UIButton in the same window. I was searching that from the internet and the more like post I found wasthat and is not answered: In the application…
Jpellat
  • 907
  • 7
  • 29