opengl-es

2D distortion of a face from an image on iOS? (similar to Fat Booth etc.)

巧了我就是萌 提交于 2019-12-30 01:39:27
问题 I was just wondering if someone knows about some good library or tutorial on how to achieve a 2D distortion of a face taken from an image taken by the user. I would like to achieve a similar effect to the one in Fatify, Oldify, all those Fat Booths, etc., because I am creating an app where you will throw something at the face and I would the face to jiggle and move when the object hits it. How should I do this? 回答1: I have found an almost identical question here with an accepted answer. Also,

Is there an tutorial on loading an 3D model in openGL ES on the iPhone?

时间秒杀一切 提交于 2019-12-30 01:33:04
问题 I've started to play around with some 3d modelers a while ago. Now I'm curious: How can I bring such an 3D model to the iPhone or iPad, so that I can see it on screen and maybe even rotate it with gestures? 1) What's the best file format for the 3D models? 2) How would I load a particular 3D model file into openGL ES and then render it? 3) How would I apply an material to the polys, i.e. to make the model appear red? 4) Does the model have some sort of center or pivot point where I can rotate

Android “cpu may be pegged” bug

喜你入骨 提交于 2019-12-30 01:02:15
问题 Foreword: This severe bug can cause Android devices to lock up (unable to press Home/Back buttons, needs hard reset). It is associated with OpenGL surfaces and audio playback. Logcat repeats something to the effect of W/SharedBufferStack( 398): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. once every second, hence the name of this bug. The fundamental cause of this is likely due to a deadlock when buffering data, be it sound or graphics. I

How to directly update pixels - with CGImage and direct CGDataProvider

笑着哭i 提交于 2019-12-29 15:00:23
问题 Actual Question Several answers will solve my problem: Can I force a CGImage to reload its data from a direct data provider (created with CGDataProviderCreateDirect ) like CGContextDrawImage does? Or is there some other way I can get setting to self.layer.contents to do it? Is there a CGContext configuration, or trick I can use to render 1024x768 images at least 30 fps consistently with CGContextDrawImage . Has anyone been able to successfully use CVOpenGLESTextureCacheCreateTextureFromImage

How to directly update pixels - with CGImage and direct CGDataProvider

佐手、 提交于 2019-12-29 14:58:49
问题 Actual Question Several answers will solve my problem: Can I force a CGImage to reload its data from a direct data provider (created with CGDataProviderCreateDirect ) like CGContextDrawImage does? Or is there some other way I can get setting to self.layer.contents to do it? Is there a CGContext configuration, or trick I can use to render 1024x768 images at least 30 fps consistently with CGContextDrawImage . Has anyone been able to successfully use CVOpenGLESTextureCacheCreateTextureFromImage

Issue when porting from OpenGL 1.1 to OpenGL-ES 2.0

浪子不回头ぞ 提交于 2019-12-29 09:42:20
问题 this is my opengl-es 2.0 code : { for (surfnum=0;surfnum<surftotal;surfnum++){ for (i=0;i<triNum[surfnum];i++){ GLfloat *Vertices[] = { triArray[surfnum][i].normpt1, triArray[surfnum][i].normpt2,triArray[surfnum][i].normpt3}; glGenBuffers(1, &ui32Vbo); glBindBuffer(GL_ARRAY_BUFFER, ui32Vbo); unsigned int uiSize = 3 * (sizeof(GLfloat) * 1); glBufferData(GL_ARRAY_BUFFER, uiSize,*Vertices, GL_STATIC_DRAW); } } } for(int i = 0; i < 80000; ++i) { glClear(GL_COLOR_BUFFER_BIT); int i32Location =

Android OpenGL error: “remaining() < needed” and Android 4.4

為{幸葍}努か 提交于 2019-12-29 09:42:19
问题 I am getting an error I do not understand when I try and launch my app on a phone running Android 4.4 (It's a Moto G if this helps): java.lang.IllegalArgumentException: remaining() < needed Exception thrown in Thread[GLThread 85832,5,main] java.lang.IllegalArgumentException: remaining < needed at android.opengl.GLES20.glGetInteger v(Native Method) at com.jme3.renderer.android.OGLESShaderRenderer.intialize(OGLESShaderRenderer.java:311) at com.jme3.system.android.OGLESContext.initInThread

Android OpenGL error: “remaining() < needed” and Android 4.4

纵然是瞬间 提交于 2019-12-29 09:42:10
问题 I am getting an error I do not understand when I try and launch my app on a phone running Android 4.4 (It's a Moto G if this helps): java.lang.IllegalArgumentException: remaining() < needed Exception thrown in Thread[GLThread 85832,5,main] java.lang.IllegalArgumentException: remaining < needed at android.opengl.GLES20.glGetInteger v(Native Method) at com.jme3.renderer.android.OGLESShaderRenderer.intialize(OGLESShaderRenderer.java:311) at com.jme3.system.android.OGLESContext.initInThread

What version of GLSL is used in the iPhone(s)?

我与影子孤独终老i 提交于 2019-12-29 08:30:15
问题 I know that iPhone uses OpenGL ES 2.0, but I don't know the version of the underlying language GLSL. Is it 1.3, 1.4, 2.0, or other? 回答1: Ok, I found it myself, thanks to the _____VERSION_____ predefined macro. The GLSL ES specification used is the 1.0, which is based on the GLSL version 1.20. The OpengGL ES 2.0 and GLSL ES 1.0 specifications are available for download at http://www.khronos.org/registry/gles/. 回答2: printf("GLSL Version = %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); printf

Rendering multiple textures at different points on screen without using point sprites

*爱你&永不变心* 提交于 2019-12-29 08:23:12
问题 I'm building an ios drawing app and am having a hard time how to draw paint textures on the screen at different points. Most tutorials online refer to rendering a single texture of a certain size on screen. However, what I'm looking for is to provide an array of 2d vertices at which to draw the paint texture that is computed based on where the user touches on the screen. I was using point sprites which didn't require me to specify the texture coordinates and hte primitive object used to draw