[android-developers] Re: Media Effect artifact
I found out what was causing the problem: the width and height that
were
passed to the effect.apply() were different than the width/height of
the texture at the time of creation. After fixing that I can now see
some sensible output.
I haven't seen the errors that I mentioned above as of the fix; so,
I'm still not sure if the errors have the same cause.
--Hossein
On Apr 13, 6:55 pm, hmohtasham <shmohtas...@gmail.com> wrote:
> Oh, I forgot to mention that the app occasionally crashes with the
> following error:
>
> 04-13 09:10:33.890: E/AndroidRuntime(17201): FATAL EXCEPTION: GLThread
> 2351
> 04-13 09:10:33.890: E/AndroidRuntime(17201):
> java.lang.RuntimeException: Applying effect in wrong GL context!
> 04-13 09:10:33.890: E/AndroidRuntime(17201): at
> android.media.effect.EffectContext.assertValidGLState(EffectContext.java:
> 112)
> 04-13 09:10:33.890: E/AndroidRuntime(17201): at
> android.media.effect.FilterEffect.beginGLEffect(FilterEffect.java:67)
> 04-13 09:10:33.890: E/AndroidRuntime(17201): at
> android.media.effect.SingleFilterEffect.apply(SingleFilterEffect.java:
> 71)
> 04-13 09:10:33.890: E/AndroidRuntime(17201): at
> com.experimental.camera2gl.GLES20TriangleRenderer.onDrawFrame(GLES20Triangl eRenderer.java:
> 208)
> 04-13 09:10:33.890: E/AndroidRuntime(17201): at
> android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:
> 1462)
> 04-13 09:10:33.890: E/AndroidRuntime(17201): at
> android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
>
> and also sometimes the following error with no crash:
>
> 04-13 09:51:52.780: E/MCA(27518): GL Error: Operation 'Popping Vertex
> Attributes' caused GL error (0x506)
>
> Thanks
>
> --Hossein
>
> On Apr 13, 5:17 pm, hmohtasham <shmohtas...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Greetings!
>
> > I'm experimenting with various effects provided in the android.media.*
> > package and I
> > have been able to get some output; however, it seems that the
> > processed texture
> > (the output of the effect) is stretched to the right in a way that
> > part of the right side
> > of the input is not seen (cropped).
>
> > I draw two quads one textured with input image and the other with the
> > output,
> > within the same OnDrawFrame(). I apply the effect at the end of the
> > OnDrawFrame() after
> > glDrawArrays(). Almost everything (viewport, transformation, etc.) is
> > shared between
> > the the two quad; still the above occurs.
>
> > I appreciate any feedback, hint, and even general advice on the proper
> > use of effects
> > in the presence of GLSurface.
>
> > Thanks
>
> > --Hossein
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home