Note that there are some explanatory texts on larger screens.

plurals
  1. POOpengl texture flickering in some android devices
    primarykey
    data
    text
    <p>We are a team of developers working on a terrain visualization software over a virtual 3D globe. The project is aimed at mobile devices running android, mainly tablets and mobile phones. We have tested this in several devices and, while mobile phones seem to run the application fine (we haven't detected any issues on any of them), some tablets seem to have problems when drawing the textures in the screen. </p> <p>For clarity purposes, im attaching a video that displays the problem, since its a little difficult to explain with words. This example shows a sphere divided in 200 sectors, each one with a different texture.</p> <p><a href="http://vimeo.com/36541512" rel="nofollow">Texture problem video</a></p> <p>As you can see, sometimes it looks like it is trying to draw two different textures in the same sector at the same time.</p> <p>We have tested this in these devices:</p> <ul> <li>Samsung Galaxy S SLC (ok)</li> <li>HTC Desire (ok)</li> <li>Nook Ebook Reader (ok)</li> <li>Samsung Galaxy Tab 10.1 (doesnt work propperly)</li> <li>Sony Tablet S (doesnt work either)</li> <li>Samsung Galaxy Tab 7.0 (ok)</li> </ul> <p>Im posting the critical code that may be involved in this. First the fragment shader that is used to draw the textures:</p> <pre><code>varying mediump vec2 TextureCoordOut; uniform sampler2D Sampler; .... gl_FragColor = texture2D (Sampler, TextureCoordOut); </code></pre> <p>Next, im posting the key instructions that are executed in OpenGL, since the code is spared in several big functions:</p> <pre><code>GLES20.glGenTextures(num, idTextures, 1); //declare 200 textures ... GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, idTextures[texture]); //texture binding ... GLES20.glVertexAttribPointer(Attributes.Position, size, GLES20.GL_FLOAT, false, stride, fb); ... GLES20.glVertexAttribPointer(Attributes.TextureCoord, size, GLES20.GL_FLOAT, false, stride, fb); ... GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, first, count); </code></pre> <p>Im sorry not to be able to provide more details, but after several weeks of debugging, we have no clue at all of what could be causing this. Im turning to you hoping for any leads, since we are completely lost right now. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload