opengl-es

How to get application menu over a currently running screen

怎甘沉沦 提交于 2019-12-24 20:27:07
问题 I want to get an application menu bar on the left hand side of the screen without disturbing the task that is already running for eg.a live wallpaper or video.How can it be achieved? 回答1: Please use this service class. by starting this service from your activity you will get an image in your mobile screen. by adjusting that you can set any where in the mobile. and you can remove it by stopping the service any time. import java.io.File; import java.io.FileNotFoundException; import java.io

Rotating a vector using Matrix.rotateM

不羁岁月 提交于 2019-12-24 20:07:50
问题 I have made a simple class called Vector3. It's a 3 dimensional vector with some basic math implementions. Now i want to be able to rotate this single vector, but i get an exception. I have this: private static final float[] matrix = new float[16]; private static final float[] inVec = new float[4]; private static final float[] outVec = new float[4]; public Vector3 rotate(float angle, float axisX, float axisY, float axisZ) { inVec[0] = x; inVec[1] = y; inVec[2] = z; inVec[3] = 1; Matrix

OpenGL ES 1.1 wont render textures?

点点圈 提交于 2019-12-24 19:12:50
问题 Right, I posted a similar question, Ive tried completely rebuilding the files and what happens now is textures aren't rendering at all. The image is 512x512. For some reason the texture works on simulator but not my iPod. In a class called EAGLView there is, beginDraw and finishDraw which are called at the beggining and end of my game loop. Layout subviews is called when I create the view. -(void)beginDraw { // Make sure that you are drawing to the current context [EAGLContext

Android Studio 1.3 RC1 NDK Unable to load native library

∥☆過路亽.° 提交于 2019-12-24 17:05:48
问题 Tonight I switched my ndk application to work with the new Android Studio 1.3 preview. I have 2 devices Nexus 5(5.1.1) and MotoG(4.4.4). When compiled via ndk-build the application works on both devices. Using gradle build the Nexus 5 executes correctly but on the MotoG I get an exception: 07-11 04:13:58.509 16751-16751/com.mbyan.android E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.mbyan.android, PID: 16751 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mbyan

OpenGL ES, add texture to circle

只愿长相守 提交于 2019-12-24 15:36:43
问题 I'm drawing a circle in OpenGL ES and when adding a texture it is "added" 4 times instead of 1 (see the image below). In other words, that is my picture x4. What I want is the nuke symbol centered as one picture in the circle. Below is my method (in the Circle class) for drawing the circle using a texture public void drawTexture(GL10 gl) { gl.glFrontFace(GL10.GL_CCW); // Front face in counter-clockwise orientation gl.glEnable(GL10.GL_CULL_FACE); // Enable cull face gl.glCullFace(GL10.GL_BACK)

Making a Mesh Plane in WebGL with Triangles

﹥>﹥吖頭↗ 提交于 2019-12-24 15:26:46
问题 I'm trying to create a triangulated plane in WebGL and I have the following code. However, when I render this in the browser, it just gives me a vertical line parallel to the y-axis. var quads = 200; for (var y = 0; y <= quads; ++y) { var v = y / quads * 40; for (var x = 0; x <= quads; ++x) { var u = x / quads * 40; recipient.vertices.push( vec3(u, v, 1)) recipient.normals.push( vec3(0, 0, 1)) } } var rowSize = (quads + 1); for (var y = 0; y < quads; ++y) { var rowOffset0 = (y + 0) * rowSize;

Using interstitials from Admob in a Libgdx game for Android, it's slow when dismissing it

喜你入骨 提交于 2019-12-24 14:18:03
问题 I've been using interstitials from Admob with my libgdx game for Android and my problem is that when I dismiss it after it was shown, it takes quite some time to give the control back to my game (around 4-5 seconds, which is not good at all). I don't know why it does that. Also, when I just leave my game (pressing the Home button) and then come back to it, it also takes around the same time. Maybe it has something to do with the opengl context loss.. 回答1: Run the ad call on a separate UI

Android page curl with images streaming from web?

北城余情 提交于 2019-12-24 13:49:20
问题 So, I am using https://github.com/harism/android_page_curl , this project to achieve the curl functionality to create a book. But I want to achieve the same while streaming images from web directly, obviously in an asynchronous manner. But then I would require an OpenGL , progress bar for the same. But I don't have any knowledge in OPENGL , So how can I go about tweaking this code and achieve the functionality I want. Also , have a look at this question for more clear view of what I want to

GPUImage shader crashing with “ERROR: One or more attached shaders not successfully compiled”

匆匆过客 提交于 2019-12-24 13:27:53
问题 I'm trying to build a Vibrance filter for GPUImage based on this Javascript: /** * @filter Vibrance * @description Modifies the saturation of desaturated colors, leaving saturated colors unmodified. * @param amount -1 to 1 (-1 is minimum vibrance, 0 is no change, and 1 is maximum vibrance) */ function vibrance(amount) { gl.vibrance = gl.vibrance || new Shader(null, '\ uniform sampler2D texture;\ uniform float amount;\ varying vec2 texCoord;\ void main() {\ vec4 color = texture2D(texture,

How to draw path like canvas in Android using OpenGL ES 2?

[亡魂溺海] 提交于 2019-12-24 11:14:26
问题 I have tried Canvas in Android, and I can make sketch or path by moving my finger on the screen. Now, I want to do the same thing using OpenGL 2. I'm new to OpenGL programming but I have tried several method to draw a Line using GLES20.glDrawArray(...) and a Line Shape class but still, this just make a straight line not like a free-form path i wanted just like when I use canvas. and also, if i try to draw per line segment each time ACTION_MOVE, concurrent modification exception often happens