glkit

Release textures (GLKTextureInfo objects) allocated by GLKTextureLoader

时间秒杀一切 提交于 2019-11-30 05:21:35
New to developing on iOS and in particular the new OpenGL related features on iOS 5, so I apologize if any of my questions are so basic. The app I am working on is designed to receive camera frames and display them on screen via OpenGL ES (the graphic folks will take over this and add the actual OpenGL drawing about which I know very little). The application is developed XCode4, and the target is iPhone4 running iOS 5. For the moment, I used the ARC and the GLKit functionality and all is working fine except for the memory leak in loading the images as texture. The app receives a "memory

opengles display human face in iphone

随声附和 提交于 2019-11-29 15:18:22
问题 I need to make a human 2D face to 3D face. I used this link to load an ".obj" file and map the textures. This example is only for cube and pyramid. I loaded a human face ".obj" file. This loads the .obj file and can get the human face properly as below. But my problem here is I need to display different human faces without changing the ".obj" file. just by texture mapping. But the texture is not getting mapped properly, as the obj file is of different model. I just tried changing the ".png"

Release textures (GLKTextureInfo objects) allocated by GLKTextureLoader

旧巷老猫 提交于 2019-11-29 02:55:07
问题 New to developing on iOS and in particular the new OpenGL related features on iOS 5, so I apologize if any of my questions are so basic. The app I am working on is designed to receive camera frames and display them on screen via OpenGL ES (the graphic folks will take over this and add the actual OpenGL drawing about which I know very little). The application is developed XCode4, and the target is iPhone4 running iOS 5. For the moment, I used the ARC and the GLKit functionality and all is

OpenGL ES 2.0 render to texture

岁酱吖の 提交于 2019-11-28 23:31:32
I'm trying to render to a texture using OpenGL ES 2.0, but I can't seem to make it work. This is how I proceed: struct RenderTexture { GLuint framebuffer; GLuint tex; GLint old_fbo; RenderTexture(GLuint width, GLuint height) { glGetIntegerv(GL_FRAMEBUFFER_BINDING, &old_fbo); glGenFramebuffers(1, &framebuffer); glGenTextures(1, &tex); glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); glBindTexture(GL_TEXTURE_2D, tex); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0);

Nested GLKView and GLKViewController

旧巷老猫 提交于 2019-11-28 08:59:27
问题 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, rotating (trackball algorithm). Now that this is done, I wanted to play with the different projection matrices and I started to design a user interface to do just that: (source: canardpc.com) The only problem is that it doesn't work when the top view in a

Using GLKMath from GLKit in Swift

时间秒杀一切 提交于 2019-11-27 09:26:47
So I'm using a book called iOS Games by tutorials from Ray Wenderlich and trying to utilize some of the objective-C code found there to make the accelerometer control of a character in my game work. Instead of Objective-C though, I want to use Swift. I ran into an issue when trying to create a var of type GLKVector3, which represents a 3D vector. When I type in: var raw:GLKVector3 = GLKVector3Make(irrelevant stuff) I get the following error: use of module GLKVector3 as type. I have an import at the top of my swift file for GLKit: import GLKit Any ideas how I can get the functionality from the

Using GLKMath from GLKit in Swift

风流意气都作罢 提交于 2019-11-26 14:44:55
问题 So I'm using a book called iOS Games by tutorials from Ray Wenderlich and trying to utilize some of the objective-C code found there to make the accelerometer control of a character in my game work. Instead of Objective-C though, I want to use Swift. I ran into an issue when trying to create a var of type GLKVector3, which represents a 3D vector. When I type in: var raw:GLKVector3 = GLKVector3Make(irrelevant stuff) I get the following error: use of module GLKVector3 as type. I have an import