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
0
votes
0 answers

iOS GLKView Call multiple glUseProgram in a single draw

Say I use GLKit in iOS for OpenGL rendering. And I want to draw two different objects. So I created two shader programs. And when I draw each object separated, it works well. But if I combine these two program in a single frame draw. The first…
vanney
  • 1
  • 1
0
votes
1 answer

Immediate rendering to GLKView

Let's say I have some C++ code that renders stuff in OpenGL ES. This code has it's own render loop which is the same on all platforms. One of the things that are OS dependent and have to be written for each platform separately is creating a window…
riodoro1
  • 1,246
  • 7
  • 14
0
votes
1 answer

GLKView rendering wrong resolution drawableHeight is wrong

Im rendering with (void)glkView:(GLKView *)view drawInRect:(CGRect)rect But the resolution its delivering is for an iPhone 5 and I'm rendering on an iPhone 6 the drawableHeight is calling out at 320 instead of 375 Any ideas what this could be?
joshsslade
  • 11
  • 2
0
votes
2 answers

Draw on UIView or GLKView?

I need to draw a separator line with some dots on it. I have decided I will do this using the draw method, as opposed to including images of the separator. I will do this for performance and for customisability, as the separator changes…
vrwim
  • 13,020
  • 13
  • 63
  • 118
0
votes
1 answer

How to snapshot a view contains GLKView

I have a viewA that contains a GLKView and subviews as UIImageView. How can I snapshot hold of viewA to an image? I'm using this code, work good for any kind of view but GLKView - (UIImage *) takeSnapshot { …
Q.u.a.n.g L.
  • 1,564
  • 1
  • 12
  • 27
0
votes
1 answer

CIContext drawImage:inRect:fromRect: doesn't work

I have a subclass of GLKView for user drawing. But i also need to draw his latest drawing image when he opens the appropriate screen. The problem is in the second part, as it seems i do something wrong which causes drawImage:inRect:fromRect: not to…
Annie
  • 147
  • 1
  • 8
0
votes
1 answer

Combining Cocos2d and GLKView to render the same data

I use cocos2d engine to render some animation to CCGLView which is placed on app main window next to regular UIViews. My application uses external screen and I would like to render on that screen exactly the same content as in CCGLView but without…
parbo
  • 243
  • 3
  • 7
0
votes
1 answer

Performance issues with resizing GLKView.

I have a GLKView displaying CIFilter's CIImage. When I resizing the view frame by pinch gesture, I got low frame rate. What is the problem behind this? How can I fit it?
Morty Choi
  • 2,466
  • 1
  • 18
  • 26
0
votes
0 answers

GLKView not working if instantiated in custom class

This doesn't works in a new Swift project. Gives me a EXC_BAD_ACCESS code=1 error in AppDelegate. UIViewController.swift import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() …
jeroen
  • 502
  • 8
  • 17
0
votes
1 answer

iOS: Switching apps after user clicks ADBannerView causes OpenGL crash

I have a GLKViewController subclass implementation, with an ADBannerView as a subview. Ads load and render just fine. The OpenGL application also works fine. When you click on an Ad, the popup appears. The GLKViewController has the default…
advayDev1
  • 86
  • 5
0
votes
1 answer

Call GLKView render on request

I create app using external renderer and how i can call redraw by request? For example, on Android I can do it using requestRenderer() and RENDERMODE_WHEN_DIRTY render mode. I have next code: import UIKit import GLKit class RendererViewController:…
Okadzaki Tomoe
  • 203
  • 3
  • 12
0
votes
1 answer

Is there anything like a GLKTableViewController?

I am currently using a GLKView connected to a GLKViewController in my iOS project to animate the background of my app which works fine. Now I introduced a UITableViewController for displaying some list. I also would like to animate the table view's…
salocinx
  • 3,715
  • 8
  • 61
  • 110
0
votes
1 answer

GLKView gesture recognizer without a GLKViewController

I have an application that uses a GLKView, with no other UI elements. I'm not using a GLKViewController, and I'm not planning to. All of my application setup occurs in didFinishLaunchingWithOptions My AppDelegate interface is defined as: @interface…
Tim Kane
  • 2,599
  • 3
  • 20
  • 19
0
votes
1 answer

iOS+OpenGL ES 2.0: Why are update() and glkView() not called by the GLKViewController?

I am trying to run the Ray Wenderlich sprite example. I have set up a GLKViewController and a GLKView and implemented the methods from the corresponding delegate protocol. - (void)glkView:(GLKView *)view drawInRect:(CGRect)rect { } - (void)update {…
salocinx
  • 3,715
  • 8
  • 61
  • 110
0
votes
1 answer

Calling setNeedsDisplay from GLKView drawRect with/without dispatch_async

I am building a custom GLKView using on-demand rendering. Most of the time the view will only redraw on touch events (and this is working), but sometimes there are short animations where I would like to redraw in a loop. My first attempt looked like…
sAm_vdP
  • 3
  • 2