opengl-es-2.0

Page Curl with best quality

限于喜欢 提交于 2019-12-01 14:38:07
I am working with Harism Page Curl(Open GL) https://github.com/harism/android_page_curl and its works fine. Output is something like this: It's not smooth too much. I want something like this: In CurlMesh class, default maxCurlSplits is 10. Increasing this number, increasing quality of lines of area. 来源: https://stackoverflow.com/questions/30726077/page-curl-with-best-quality

How to completely disable MultiWindow support in LIBGDX game

南楼画角 提交于 2019-12-01 14:09:15
I'm getting alot of memory allocations in my render thread and I've traced the cause to MultiWindow support which is weird because I have this feature disabled on my phone . I've added to AndroidManifest the following (based on this ) code inside the application tag but with no luck, I still get unwanted memory allocations (only when I touch the screen): <meta-data android:name="com.sec.android.support.multiwindow" android:value="false" /> <meta-data android:name="com.samsung.android.sdk.multiwindow.multiinstance.enable" android:value="false" /> How can I completely disable the MultiWindow

GLSL: Built-in attributes not accessible for iPhone Apps?

天大地大妈咪最大 提交于 2019-12-01 13:04:18
I am getting really desperate here. I working with Xcode, trying to implement some OpenGL stuff on the iPhone. I have to write a Shader for Phong-Lighting. I got as far as declaring my geometry (vertices, indices, calculating etc.) and passing the respective arguments as attributes to the shader (written in GLSL). Using these attributes works fine, some really basic shader programs compile correctly and give the expected output. Now I'm trying to start with some more advanced calculations, for which I need to use some of the built-in attributes of GLSL, namely i.e. the "gl_NormalMatrix", but

Why is a texture coordinate of 1.0 getting beyond the edge of the texture?

本秂侑毒 提交于 2019-12-01 13:01:27
问题 I'm doing a color lookup using a texture to apply an effect to a picture. My lookup is a gradient map using the luminance of the fragment of the first texture, then looking that up on a second texture. The 2nd texture is 256x256 with gradients going horizontally and several different gradients top to bottom. So 32 horizontal stripes each 8 pixels tall. My lookup on the x is the luminance, on the y it's a gradient and I target the center of the stripe to avoid crossover. My fragment shader

Black out everything outside a polygon

ぐ巨炮叔叔 提交于 2019-12-01 12:58:34
I have a map, for simplicity let's say it's just a single texture. On top of this map, I have a polygon which indicates the route that the user must follow. What I want is to draw everything outside the polygon black. Or, of course to only draw things inside the polygon. To explain it better I made a picture. The blue lines define the polygon, with each corner being a point in the polygon. The red with yellow lines is the part I want to black out of the picture, and only leave the red with the purple lines. The polygon starts from A and ends at B. The main challenge here is that you need to

Unmodified iOS7 Apple GLPaint example blending issue

你离开我真会死。 提交于 2019-12-01 12:31:31
In Apple's GLPaint example, the user can draw with semi-transparent brush over a surface and change colours. However, as of iOS7, for some odd reason it is not possible to draw something that completely goes over its background: In the first image, we see "Shake me" written with green and a red blob that was drawn multiple times over it. Yet, the writing bellow is still barely visible. The second image was desaturated to make the defect more obvious. The OpenGL blending function Apple is using is: glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); What I expect it to do is to blend the newer semi

GLSL: Built-in attributes not accessible for iPhone Apps?

為{幸葍}努か 提交于 2019-12-01 12:02:08
问题 I am getting really desperate here. I working with Xcode, trying to implement some OpenGL stuff on the iPhone. I have to write a Shader for Phong-Lighting. I got as far as declaring my geometry (vertices, indices, calculating etc.) and passing the respective arguments as attributes to the shader (written in GLSL). Using these attributes works fine, some really basic shader programs compile correctly and give the expected output. Now I'm trying to start with some more advanced calculations,

How to completely disable MultiWindow support in LIBGDX game

亡梦爱人 提交于 2019-12-01 11:54:28
问题 I'm getting alot of memory allocations in my render thread and I've traced the cause to MultiWindow support which is weird because I have this feature disabled on my phone . I've added to AndroidManifest the following (based on this) code inside the application tag but with no luck, I still get unwanted memory allocations (only when I touch the screen): <meta-data android:name="com.sec.android.support.multiwindow" android:value="false" /> <meta-data android:name="com.samsung.android.sdk

vertex shader doesn't run on galaxy tab10 (tegra 2)

不羁的心 提交于 2019-12-01 11:22:19
I created an app that uses GLES2.0 on a HTC Desire S. It works on the HTC, but not on an Samung Galaxy tab10.1. The program cannot be linked (GLES20.glGetProgramiv(mProgram, GLES20.GL_LINK_STATUS, linOk,0) gives-1) and glGetError() gives me an error 1282 (Invalid Operation). When I replace this line (in the shader): graph_coord.z = (texture2D(mytexture, graph_coord.xy / 2.0 + 0.5).r); by graph_coord.z = 0.2; it works also on the galaxy tab. My shader looks like this: private final String vertexShaderCode = "attribute vec2 coord2d;" + "varying vec4 graph_coord;" + "uniform mat4 texture

Rendering multiple 2D images in OpenGL-ES 2.0

走远了吗. 提交于 2019-12-01 11:18:49
I am new to OpenGL, and trying to learn ES 2.0. To start with, I am working on a card game, where I need to render multiple card images. I followed this http://www.learnopengles.com/android-lesson-four-introducing-basic-texturing/ I have created a few classes to handle the data and actions. MySprite holds the texture information, including the location and scale factors. Batcher draws all the sprites in one go. It is rough implementation. ShaderHelper manages creation of shaders and linking them to a program. GLRenderer is where the rendering is handled (it implements `Renderer`.) Q1 My