opengl-es

Android Low image quality / altered image when using glReadPixels

﹥>﹥吖頭↗ 提交于 2019-12-08 00:41:13
问题 I've spend a lot of time trying to figure this out but can't see what I am doing wrong. This is my original image Image recaptured 5 times Recapturing the image multiple times clearly shows that there is something not right. Capturing it once is just ok but twice is enough to clearly see the difference. I found these similar issues on stackoverflow: Bitmap quality using glReadPixels with frame buffer objects Extract pixels from TextureSurface using glReadPixels resulting in bad image Bitmap

openGL drawing distorted sprites (images) in psuedo-3d perspective

╄→尐↘猪︶ㄣ 提交于 2019-12-08 00:21:40
问题 Alright so this is going to be a doozy to explain. I'm making a very basic "pseudo-3d" racing game for Android using AndEngine (and in turn, openGL - I think). I don't believe using AndEngine really has anything to do with this problem though, because I'm directly accessing openGL functions to accomplish my drawing. Anyways, I copy-pasta'd some code that allowed the normally 2d AndEngine to have a 3d perspective (tutorial for such can be found here. This works pretty well, and I also don't

High-performance copying of RGB pixel data to the screen in iOS

♀尐吖头ヾ 提交于 2019-12-07 23:58:32
问题 Our product contains a kind of software image decoder that essentially produces full-frame pixel data that needs to be rapidly copied the screen (we're running on iOS). Currently we're using CGBitmapContextCreate and we access the memory buffer directly, then for each frame we call CGBitmapContextCreateImage, and then draw that bitmap to the screen. This is WAY too slow for full-screen refreshes on the iPad's retina display at a decent framerate (but it was okay for non-Retina-devices). We've

Iphone pixel distortion while zooming OpenGL ES content for Paint app

对着背影说爱祢 提交于 2019-12-07 23:44:47
问题 I have a strange problem with openGL ES. I’m working on a paint app for iphone [taking reference from GLPaint app] .In my code I'm using an imageView which contain outline image on which I am puting [CAEAGLLayer] paintView for filling colors. I am filling colors in outline image by drawings lines onscreen based on where the user touches. I'm using the "renderLineFromPoint" function to draw a line between two points using "touchesMoved" for getting starting point and ending point. - (void)

ios : Displaying a simple 3D model with GLEssentials sample code

烈酒焚心 提交于 2019-12-07 22:45:08
问题 My goal is to display a simple 3D model and apply a texture on it. I've downloaded the GLEssentials ios sample project to learn how to develop this (i'm new in ios OpenGL-ES API) But the example model is a .model file, which I never heard about and which never appear in model bank websites. What is this kind of file? is the sample code compatible with other common model types (.obj, .c2d, .3ds)? is it a good idea to start from this project? 回答1: Have a look at this question: How to convert

SceneKit painting on texture with texture coordinates

跟風遠走 提交于 2019-12-07 21:24:25
问题 I have a Collada model that I load into SceneKit. When I perform a hittest on the model I am able to retrieve the texture coordinates of the model that was hit. With these texture coordinates I should be able to replace texture coordinates with a color. So this way I should be able to draw on the model Correct me if I am wrong so far. I read a lot of articles till now but I just don't get my shaders right. ( Though I did get some funky effects ;-) My vertex shader : precision highp float;

Binding Multiple Textures to One Mesh in OpenGL ES 1.1

元气小坏坏 提交于 2019-12-07 20:40:29
问题 If I have a mesh (such as a cube with 6 faces, each consisting individually of 4 vertices, totaling 24 vertices) and I want to apply a different texture to each face, how would I do this? Currently I draw the entire mesh (all 6 faces of a cube) at once using glDrawElements(), supplying all of the indices into one buffer. I cannot see a way to apply a texture to a subset of the indices when drawing. Would I have to split up the indices, drawing each face one-by-one, rebinding textures between

Implement the Fixed function Pipeline efficent in OpenGL ES 2.0?

独自空忆成欢 提交于 2019-12-07 20:18:26
I want to use fixed function methods like glTranslate(), glRotate(), glScale() in my openGL 2.0 App. I know, that I need to implement an matrix class - and have done this. My question now is about efficiency. To be able to use something like: glLoadIdentity(); glRotatef(2.0f, 0.0f, 0.0f, 1.0f); glScalef(2.0f, 2.0f, 2.0f); I think, I need to do at least 3 matrix multiplications (assuming we have a projection and a modelview matrizes and this is for the modelview). First would be: Identity-Matrix*Rotation-Matrix - Second is: ActualMatrix*ScaleMatrix and the last would be: projectionMatrix

presentRenderbuffer : GL_RENDERBUFFER_OES takes long time

若如初见. 提交于 2019-12-07 17:55:47
问题 I added a profiler to my game and isolated this function. It, sometimes, cause FPS drop. This is my result: Present buffer time: 22 Present buffer time: 1 Present buffer time: 9 Present buffer time: 1 Present buffer time: 20 Present buffer time: 6 Present buffer time: 4 Present buffer time: 4 Present buffer time: 22 Present buffer time: 4 Present buffer time: 8 Present buffer time: 4 Present buffer time: 4 Present buffer time: 15 Present buffer time: 1 Present buffer time: 1 Present buffer

OpenGL texture blending problems

混江龙づ霸主 提交于 2019-12-07 17:38:44
问题 I'm creating a 2d application for the iPad using OpenGL ES and having some issue drawing transparent images. I'm using png-24 images with full transparency. I'm also changing the color of some of some textures, which are white with some areas transparent or semi-transparent. That all works fine. When I try to set the alpha value of one of these textures, however, it's not working quite right. The colors are much too saturated, and if the alpha value = 0, i'm left with a white rather than