opengl-es-2.0

Android thread performance/priority on Galaxy Note 2 when screen is touched/released

我的梦境 提交于 2019-12-17 19:55:28
问题 I have an OpenGL game for Android. It runs at a good 60fps when the screen is touched. When I release my finger it goes back down to around 30fps. Does the touch event/release raise/lower a thread's priority and if so how can I replicate this to keep it at a constant 60fps. This only seems to be an issue on Galaxy Note 2 so far. 回答1: I'll assume you are using onDrawFrame and setRenderMode(RENDERMODE_CONTINUOUSLY) . 30 and 60FPS indicates that your implementation of onDrawFrame is called as

Is Opengl Development GPU Dependant?

泄露秘密 提交于 2019-12-17 18:59:27
问题 I am developing an android application in opengl ES2.0.In this Application I used to draw multiple lines and circles by touch event in GL surfaceView. As opengl depends on GPU, Currently it works fine in Google Nexus 7(ULP GeForce). In Samsung Galaxy Note 2(MALI 400MP) I'm trying to draw more than one line, but it clears the previous line and draw current line as new. In Sony Xperia Neo V(Adreno 205) I'm trying to draw a new line, it crashes the surface as shown in below image. Is it possible

Android OpenGL ES 2.0 screen coordinates to world coordinates

狂风中的少年 提交于 2019-12-17 17:41:46
问题 I'm building an Android application that uses OpenGL ES 2.0 and I've run into a wall. I'm trying to convert screen coordinates (where the user touches) to world coordinates. I've tried reading and playing around with GLU.gluUnProject but I'm either doing it wrong or just don't understand it. This is my attempt.... public void getWorldFromScreen(float x, float y) { int viewport[] = { 0, 0, width , height}; float startY = ((float) (height) - y); float[] near = { 0.0f, 0.0f, 0.0f, 0.0f }; float[

Android OpenGL ES 2.0 screen coordinates to world coordinates

烂漫一生 提交于 2019-12-17 17:41:32
问题 I'm building an Android application that uses OpenGL ES 2.0 and I've run into a wall. I'm trying to convert screen coordinates (where the user touches) to world coordinates. I've tried reading and playing around with GLU.gluUnProject but I'm either doing it wrong or just don't understand it. This is my attempt.... public void getWorldFromScreen(float x, float y) { int viewport[] = { 0, 0, width , height}; float startY = ((float) (height) - y); float[] near = { 0.0f, 0.0f, 0.0f, 0.0f }; float[

Choose OpenGL ES 1.1 or OpenGL ES 2.0?

北城余情 提交于 2019-12-17 17:36:18
问题 I'm going to start a new cross-plattform openGL project (primary for iPhone & PC). So theres the main question: targeting for OpenGL ES 1.1 or OpenGL ES 2.0? Or both? So far I read Open GL ES 1.1 isnt really deprecated, isn't it? So what would speak for openGL ES 2.0? Programmable vertex- & fragmentshader - Anything else? I heard about performance decrease with alpha blending or so - can that be true? I assume openGL ES 2.0 code should also run on PC - So is openGL ES 2.0 is really more

Android OpenGL2.0 showing black textures

杀马特。学长 韩版系。学妹 提交于 2019-12-17 16:13:37
问题 I am trying to draw textures onto quads in OpenGL2.0. So far I got the quads to show up and everything, but the textures are not there - the quads are all black. My main suspicion is that i'm not mapping the textures correctly - my textures are not powers of 2, nor are they square - their width is in the field mWidth and their height in mRowHeight. The quads are drawn in a vertical list, which is done with a translate matrix. I'll be very grateful if anyone can go over this cause I'm

How to draw basic circle in OpenGL ES 2.0 Android

混江龙づ霸主 提交于 2019-12-17 15:44:13
问题 I'm new in OpenGL ES 2, and I have read many topics about how to draw a circle in OpenGL ES 2 on Android. Based on Drawing Shapes and this code found on gamedev.net, I can draw triangles and quares, but I still don't know how to draw a circle. I now have three ways to draw a circle: Generate vertices in a circle and use glDrawArray( GL_LINES, ... ). Depending on how many vertices you generate this will yield a nice and crisp result. Use a pregenerated texture of a circle (with alpha

How can I do these image processing tasks using OpenGL ES 2.0 shaders?

别等时光非礼了梦想. 提交于 2019-12-17 06:22:24
问题 How can I perform the following image processing tasks using OpenGL ES 2.0 shaders? Colorspace transform ( RGB/YUV/HSL/Lab ) Swirling of the image Converting to a sketch Converting to an oil painting 回答1: I just added filters to my open source GPUImage framework that perform three of the four processing tasks you describe (swirling, sketch filtering, and converting to an oil painting). While I don't yet have colorspace transforms as filters, I do have the ability to apply a matrix to

Modifying camera output using SurfaceTexture and OpenGL

爷,独闯天下 提交于 2019-12-17 04:45:41
问题 I am trying to filter the stream coming from the camera hardware by running it through an openGL filter, then displaying it in a GLSurfaceView. When openGL goes to render the frame, the LogCat repeatedly spits out an error: [unnamed-3314-0] updateTexImage: clearing GL error: 0x502 0x502 is a generic openGL error, and doesn't really help me track down the problem. This is a sequence of how the code works (or atleast should be working as seen in my head), and I've copied my code below that. I

Modifying camera output using SurfaceTexture and OpenGL

痞子三分冷 提交于 2019-12-17 04:45:09
问题 I am trying to filter the stream coming from the camera hardware by running it through an openGL filter, then displaying it in a GLSurfaceView. When openGL goes to render the frame, the LogCat repeatedly spits out an error: [unnamed-3314-0] updateTexImage: clearing GL error: 0x502 0x502 is a generic openGL error, and doesn't really help me track down the problem. This is a sequence of how the code works (or atleast should be working as seen in my head), and I've copied my code below that. I