opengl-es-2.0

iOS CVImageBuffer distorted from AVCaptureSessionDataOutput with AVCaptureSessionPresetPhoto

只愿长相守 提交于 2019-11-27 17:24:39
At a high level, I created an app that lets a user point his or her iPhone camera around and see video frames that have been processed with visual effects. Additionally, the user can tap a button to take a freeze-frame of the current preview as a high-resolution photo that is saved in their iPhone library. To do this, the app follows this procedure: 1) Create an AVCaptureSession captureSession = [[AVCaptureSession alloc] init]; [captureSession setSessionPreset:AVCaptureSessionPreset640x480]; 2) Hook up an AVCaptureDeviceInput using the back-facing camera. videoInput = [[[AVCaptureDeviceInput

Multiple cameras in libgdx ( probably similar in other frameworks )

不羁的心 提交于 2019-11-27 16:29:34
问题 I have been trying to solve this problem for two days and I have given up trying to find an existing solution. I have started learning libgdx and finished a couple of tutorials. And now I have tried to use all that I have learned and create a simple side scrolling game. Now, I know that there are libgdx examples of this, but I haven't found a one that incorporates Box2d with scene2d and actors as well as tiled maps. My main problem is with the cameras. You need a camera for the Stage (which

Antialiasing in OpenGL ES 2.0?

廉价感情. 提交于 2019-11-27 14:12:51
问题 Is there a way to implement Anitaliasing technique in OpenGL ES 2.0 ? I have goggled and found few methods but there was no change in the output. In the worst case I've planned to implement multiple pass rendering, to smooth the edges in fragment shader, by displaying average colour of the pixels around every pixel, but it costs more GPU performance. Any suggestions ? 回答1: A lot of devices support MSAA (Multi-Sample Anti-Aliasing). To take advantage of this feature, you have to choose a

Repeating OpenGL-es texture bound to hills in cocos2d 2.0

谁都会走 提交于 2019-11-27 13:07:33
问题 ORIGINAL ARTICLE I am in the process of trying to implement raywenderlich's tutorial on generating hills with repeating striped coordinates using cocos2d, This article was written for Cocos2D 1.0, and as I am trying to port it to Cocos2D 2.0 This means updating it for openGl-es 2. So far everything has worked perfectly, However I am having problems with getting the texture of the hill to repeat properly... Here is my code: Sending the hills the texture: CCSprite *stripes = [self

Using SurfaceTexture in Android

我的梦境 提交于 2019-11-27 11:59:15
问题 I want to play a video into an OpenGL texture on XOOM using Android 3.0. I have come across SurfaceTexture in the goole developer docs which has been added in API 11 http://developer.android.com/reference/android/graphics/SurfaceTexture.html The documentation talks about using GL_TEXTURE_EXTERNAL_OES instead of GL_TEXTURE_2D, I cannot find any reference to this define in the latest android-ndk-r5c, it's not defined in in the ndk and it only goes up to platform-9, so I guess I would need

OpenGL ES 2.0 Object Picking on iOS

懵懂的女人 提交于 2019-11-27 11:36:59
What is the best method to select objects that have been drawn in OpenGL ES 2.0 (iOS)? I am drawing points. Here is working prototype of color picking, tested on most old ipads and working well. This is actually some part of project called InCube Chess that one may find in app store. The main code you will see is located in a class derived from GLKViewController like this: @interface IncubeViewController : GLKViewController This means you have glkview in it: ((GLKView *)self.view). Here are also some properties: @property (strong, nonatomic) EAGLContext *context; @property (strong, nonatomic)

Learning OpenGLES 2.0 on iOS [closed]

限于喜欢 提交于 2019-11-27 10:09:40
I'm a beginner with OpenGL ES 2.0 and I'm looking for a good book/resource that will help me with my learning. I've found several books: OpenGL® ES 2.0 Programming Guide iPhone 3D Programming: Developing Graphical Applications with OpenGL ES but reading the Amazon reviews I saw that they either assume previous knowledge with OpenGL or are not written specifically for iOS. (I know OpenGL should be easy to port, but I'm looking for a book/resource with examples in C, not C++, that talks about OpenGL in the iOS context) I also found this and it really helped me getting a grasp on the basic

about opengles and texture on android

∥☆過路亽.° 提交于 2019-11-27 08:45:12
问题 As we know,in the OpenGL ES the class Renderer on android has 3 function:onDrawFrame, onSurfaceChanged, onSurfaceCreated. and we can load the texture in the onSurfaceCreated and onDrawFrame . I want to know can i load the texture before the "Renderer" .Likely, I have a class named "Map",and can i load the images texture in the "Map" before the "GLSurfaceView" created. or can i load the images texture before the function "onSurfaceCreated" and "onDrawFrame" . if someone know it,please help me.

glClearColor not working correct (android opengl)

◇◆丶佛笑我妖孽 提交于 2019-11-27 07:15:27
问题 I want to change the background color of my app on runtime. So on button click I first call: GLES20.glClearColor(color[0], color[1], color[2], color[3]); Then I call: GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); And it does nothing! It keeps the current background color - doesnt change it. But when I then pause my app and resume it again the background color is changed. EDIT: I found out a way to do it. Each frame i first call glClear but I dident call glClearColor

In OpenGL ES 2.0 / GLSL, where do you need precision specifiers?

核能气质少年 提交于 2019-11-27 06:43:54
Does the variable that you're stuffing values into dictate what precision you're working with, to the right of the equals sign? For example, is there any difference, of meaning, to the precision specifier here: gl_FragColor = lowp vec4(1); Here's another example: lowp float floaty = 1. * 2.; floaty = lowp 1. * lowp 2.; And if you take some floats, and create a vector or matrix from them, will that vector or matrix take on the precision of the values you stuff it with, or will those values transform into another precision level? I think optimizing this would best answer the question: dot(gl