Questions tagged [glkview]

The GLKView class simplifies the effort required to create an OpenGL ES application by providing a default implementation of an OpenGL ES-aware view in iOS 5.0 and later.

GLKView class simplifies the effort required to create an OpenGL ES application by providing a default implementation of an OpenGL ES-aware view. A GLKView directly manages a framebuffer object on developer application’s behalf; developer's application simply needs to draw into the framebuffer when the contents need to be updated.

79 questions
1
vote
1 answer

GLKView GLKMatrix4MakeLookAt description and explanation

For modelviewMatrix I understand how to form translate and scale Matrix. But I am unable to understand how to form viewMatrix using GLKMatrix4MakeLookAt. Can anyone explain how to it works and how to give value to parameters(eye center up X Y…
Prashanth Rajagopalan
  • 718
  • 1
  • 10
  • 27
1
vote
1 answer

GLKViewController - DrawinRect and Update stop firing when leaving view?

I've a GLKViewController which renders an OpenGL 2.0 scene. All works fine, but when I segue to a new storyboard scene (via a UINav Controller) and then return to the OpenGL ES 2.0 scene, the update and drawRect methods in the view controller are no…
GuybrushThreepwood
  • 5,598
  • 9
  • 55
  • 113
1
vote
0 answers

iOS - scaling/resizing a GLKView

I'm rendering a GL_POINTS image in a GLKView with width & height = .25, meaning it has dimensions equal to a quarter of the screen's dimensions. I would like to make its dimensions match the screen's ones, i.e. 4 times bigger than they are now. I…
1
vote
1 answer

Dynamically render lines between vertices OpenGL

How does one efficiently update the vertices between render calls and dynamically render lines between some of these points? I am working on a basic OpenGL example and it's a static vertices array that renders using glDrawArrays and the GL_TRIANGLES…
some_id
  • 29,466
  • 62
  • 182
  • 304
1
vote
1 answer

OpenGL ES 2.0 textures for retina display?

I have got a GLKView, where I try to draw a couple of cubes and I create textures from a view and map them onto the cubes. However, when I start the app on a retina device, the textures are correctly sized but they look terrible. I have tried to set…
the_critic
  • 12,720
  • 19
  • 67
  • 115
1
vote
1 answer

how to increase the size of the cube-openGL

I am trying to display cube and rotating it.I have succeded in doing this glkview drawinrect delegate method called only once I have taken the code to set up the cube from here…
Akbar
  • 1,509
  • 1
  • 16
  • 32
1
vote
1 answer

Is glDrawArray preferred way for dynamic vertices?

I am currently using glDrawElements to render a mesh (terrain) that may have occasional udpates to it (terrain morphing). Wondering if i should technically go with glDrawArrays instead?
AlvinfromDiaspar
  • 6,611
  • 13
  • 75
  • 140
1
vote
1 answer

How to show UIButton over GLKView with UIViewController - IOS?

I am new to OpenGL, I have been trying to show a button over the GLKView, but buttons are not showing. Here is what I have done... context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; if (!_context) { NSLog(@"Failed…
Newbee
  • 3,231
  • 7
  • 42
  • 74
1
vote
0 answers

Show 2 OpenGLES views side by side on ios

I am new to opengl programming on ios. So I started with the opegles game template that comes in Xcode. That works as it is. However, I have been struggling with setting up two opengles views side by side. Here's my implementation. In…
1
vote
1 answer

Add multiple simple OpenGL cubes to one context and set up perspective for the individual cubes

I have a couple of cube shaped objects that I add to a single context, which is in my GLKView . Every single cube is a subclass of NSObject and have their own base effect respectively. I set up the projection matrix and base effect for every single…
the_critic
  • 12,720
  • 19
  • 67
  • 115
0
votes
1 answer

GLKView in IB will cause crash when app is run without Xcode

I have an app that displays a ViewController at some point, which includes a GLKView. All defined within a storyboard. It works just fine, that is, unless you run the app from the phone itself, not launched from within Xcode. Upon presentation of…
Eric
  • 117
  • 7
0
votes
0 answers

in glkview front camera is showing mirroring issue

i am making custom camera using glkview in swift back camera work properly but when i switch camera to the front. front camera is started mirroring can anyone please help me with this. import UIKit import GLKit import AVFoundation public protocol…
ronak jani
  • 87
  • 7
0
votes
2 answers

GLKView display method causing crash at [GLKView _createFramebuffer]

Starting iOS 11, I have been noticing OpenGL-ES crashes, when we call display method on GLKView. We have made sure GLKView and EAGLContext are properly instantiated and called from appropriate thread. Below is the stack trace related to the crash.…
Prasad
  • 166
  • 7
0
votes
1 answer

How to run a Timer in connection the the display refresh rate?

I have an object who calculate the velocity of a scrolling area. When the user move up his finger off the screen, then this object fire an event every 10 ms to update the position of the scrolling (regarding to the calculated velocity) and refresh…
user8584960
0
votes
1 answer

GLKView with stencil buffer's glDrawElements results in black screen

I have an iOS app that uses GLKViewController and I set up the render buffer as follows: inside @interface RootViewController : GLKViewController - viewDidLoad { [super viewDidLoad]; _context = [[EAGLContext alloc]…
Zennichimaro
  • 5,236
  • 6
  • 54
  • 78