Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ruspa

Pages: [1]
1
Support / EGL_BAD_SURFACE after some orientation changes
« on: March 05, 2016, 03:02:22 pm »
hello, anyone had issues after you've changed screen orientation a few times? Especially maybe with wallpapers based on GLSurfaceView(http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live-wallpapers)?
I'd have preferred to force my app not to change orientation in any case, but since it's a live wallpaper I really cannot do it. You can always change the orientation of LWP in the wallpaper gallery menu, for instance, or if you have a phone with a switchblade-like side keyboard.

After a couple of times I reorient the device (and my lwp as well), or locking and unlocking very quickly, I start getting wobbles and flickers in my rendering, and in the logcat i see errors like this.

Code: [Select]
E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -19
W/Adreno-EGLSUB: <SwapBuffers:1345>: failed to queueBuffer
W/Adreno-EGL: <qeglDrvAPI_eglSwapBuffers:3888>: EGL_BAD_SURFACE
W/Adreno-EGLSUB: <DequeueBuffer:721>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
W/Adreno-EGL: <qeglDrvAPI_eglSwapBuffers:3792>: EGL_BAD_SURFACE

over and over again. At the beginning just a few. The more you keep reorienting, the more the render engine gets recreated and the more same idendical errors flow on the log.

Is this something due to previus-orientation instances still trying to render on null surfaceviews? I tried my best to not recreate everything at any rotation change but this occurs nevertheless. See the formatted log  ???

Code: [Select]
03-05 14:58:34.468 24653-24653/jPCT-AE: [ 1457186314468 ] - WARNING: MyRenderer() NEW <-----
03-05 14:58:34.485 24653-24653/jPCT-AE: [ 1457186314485 ] - WARNING: WPService.MyEngine() NEW <---
03-05 14:58:34.737 24653-24653/jPCT-AE: [ 1457186314737 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:34.738 24653-24653/jPCT-AE: [ 1457186314738 ] - WARNING: pause
03-05 14:58:34.740 24653-24653/jPCT-AE: [ 1457186314740 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:34.808 24653-24676/jPCT-AE: [ 1457186314808 ] - WARNING: creating textures ****************************************************************************
03-05 14:58:35.228 24653-24676/jPCT-AE: [ 1457186315228 ] - WARNING: creating  object
03-05 14:58:35.355 24653-24676/jPCT-AE: [ 1457186315355 ] - WARNING: creating world
03-05 14:58:35.358 24653-24676/jPCT-AE: [ 1457186315358 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:35.358 24653-24676/jPCT-AE: [ 1457186315358 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:35.358 24653-24676/jPCT-AE: [ 1457186315358 ] - WARNING: -420 0 45.0
03-05 14:58:35.358 24653-24676/jPCT-AE: [ 1457186315358 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:38.596 24653-24653/jPCT-AE: [ 1457186318596 ] - WARNING: WPService.MyEngine.onSensorChanged > portrait: true
03-05 14:58:38.663 24653-24653/jPCT-AE: [ 1457186318663 ] - WARNING: pause
03-05 14:58:38.882 24653-24653/jPCT-AE: [ 1457186318882 ] - WARNING: MyRenderer() NEW <-----
03-05 14:58:38.882 24653-24653/jPCT-AE: [ 1457186318882 ] - WARNING: WPService.MyEngine() NEW <---
03-05 14:58:38.899 24653-24653/jPCT-AE: [ 1457186318899 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:38.899 24653-24653/jPCT-AE: [ 1457186318899 ] - WARNING: pause
03-05 14:58:38.905 24653-24653/jPCT-AE: [ 1457186318905 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:38.944 24653-24846/jPCT-AE: [ 1457186318944 ] - WARNING: creating textures ****************************************************************************
03-05 14:58:38.944 24653-24846/jPCT-AE: [ 1457186318944 ] - WARNING: creating  object
03-05 14:58:39.093 24653-24846/jPCT-AE: [ 1457186319093 ] - WARNING: creating world
03-05 14:58:39.094 24653-24846/jPCT-AE: [ 1457186319094 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:39.094 24653-24846/jPCT-AE: [ 1457186319094 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:39.094 24653-24846/jPCT-AE: [ 1457186319094 ] - WARNING: -420 0 45.0
03-05 14:58:39.094 24653-24846/jPCT-AE: [ 1457186319094 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:43.830 24653-24653/jPCT-AE: [ 1457186323830 ] - WARNING: WPService.MyEngine.onSensorChanged > portrait: false
03-05 14:58:43.961 24653-24653/jPCT-AE: [ 1457186323961 ] - WARNING: pause
03-05 14:58:44.067 24653-24653/jPCT-AE: [ 1457186324067 ] - WARNING: MyRenderer() NEW <-----
03-05 14:58:44.068 24653-24653/jPCT-AE: [ 1457186324068 ] - WARNING: WPService.MyEngine() NEW <---
03-05 14:58:44.089 24653-24653/jPCT-AE: [ 1457186324089 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:44.089 24653-24653/jPCT-AE: [ 1457186324089 ] - WARNING: pause
03-05 14:58:44.101 24653-24653/jPCT-AE: [ 1457186324101 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:44.141 24653-24976/jPCT-AE: [ 1457186324141 ] - WARNING: creating textures ****************************************************************************
03-05 14:58:44.141 24653-24976/jPCT-AE: [ 1457186324141 ] - WARNING: creating  object
03-05 14:58:44.283 24653-24976/jPCT-AE: [ 1457186324283 ] - WARNING: creating world
03-05 14:58:44.284 24653-24976/jPCT-AE: [ 1457186324284 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:44.284 24653-24976/jPCT-AE: [ 1457186324284 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:44.285 24653-24976/jPCT-AE: [ 1457186324284 ] - WARNING: -420 0 45.0
03-05 14:58:44.285 24653-24976/jPCT-AE: [ 1457186324285 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:53.901 24653-24653/jPCT-AE: [ 1457186333901 ] - WARNING: WPService.MyEngine.onSensorChanged > portrait: true
03-05 14:58:54.058 24653-24976/Adreno-EGLSUB: <DequeueBuffer:721>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
03-05 14:58:54.058 24653-24976/Adreno-EGL: <qeglDrvAPI_eglSwapBuffers:3792>: EGL_BAD_SURFACE
03-05 14:58:54.108 24653-24976/Adreno-EGLSUB: <DequeueBuffer:721>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
03-05 14:58:54.108 24653-24976/Adreno-EGL: <qeglDrvAPI_eglSwapBuffers:3792>: EGL_BAD_SURFACE
03-05 14:58:54.152 24653-24653/jPCT-AE: [ 1457186334152 ] - WARNING: pause
03-05 14:58:54.192 24653-24653/jPCT-AE: [ 1457186334192 ] - WARNING: MyRenderer() NEW <-----
03-05 14:58:54.193 24653-24653/jPCT-AE: [ 1457186334193 ] - WARNING: WPService.MyEngine() NEW <---
03-05 14:58:54.221 24653-24653/jPCT-AE: [ 1457186334221 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:54.221 24653-24653/jPCT-AE: [ 1457186334221 ] - WARNING: pause
03-05 14:58:54.238 24653-24653/jPCT-AE: [ 1457186334238 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:54.263 24653-25237/jPCT-AE: [ 1457186334263 ] - WARNING: creating textures ****************************************************************************
03-05 14:58:54.263 24653-25237/jPCT-AE: [ 1457186334263 ] - WARNING: creating  object
03-05 14:58:54.409 24653-25237/jPCT-AE: [ 1457186334409 ] - WARNING: creating world
03-05 14:58:54.410 24653-25237/jPCT-AE: [ 1457186334410 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:54.410 24653-25237/jPCT-AE: [ 1457186334410 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:54.410 24653-25237/jPCT-AE: [ 1457186334410 ] - WARNING: -420 0 45.0
03-05 14:58:54.410 24653-25237/jPCT-AE: [ 1457186334410 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:56.132 24653-24653/jPCT-AE: [ 1457186336132 ] - WARNING: WPService.MyEngine.onSensorChanged > portrait: false
03-05 14:58:56.275 24653-25237/Adreno-EGLSUB: <DequeueBuffer:721>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
03-05 14:58:56.275 24653-25237/Adreno-EGL: <qeglDrvAPI_eglSwapBuffers:3792>: EGL_BAD_SURFACE
03-05 14:58:56.336 24653-25237/Adreno-EGLSUB: <DequeueBuffer:721>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
03-05 14:58:56.336 24653-25237/Adreno-EGL: <qeglDrvAPI_eglSwapBuffers:3792>: EGL_BAD_SURFACE
03-05 14:58:56.348 24653-25237/Adreno-EGLSUB: <DequeueBuffer:721>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
03-05 14:58:56.348 24653-25237/Adreno-EGL: <qeglDrvAPI_eglSwapBuffers:3792>: EGL_BAD_SURFACE
03-05 14:58:56.350 24653-24653/jPCT-AE: [ 1457186336350 ] - WARNING: pause
03-05 14:58:56.456 24653-24653/jPCT-AE: [ 1457186336456 ] - WARNING: MyRenderer() NEW <-----
03-05 14:58:56.457 24653-24653/jPCT-AE: [ 1457186336457 ] - WARNING: WPService.MyEngine() NEW <---
03-05 14:58:56.482 24653-24653/jPCT-AE: [ 1457186336482 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:56.482 24653-24653/jPCT-AE: [ 1457186336482 ] - WARNING: pause
03-05 14:58:56.508 24653-24653/jPCT-AE: [ 1457186336508 ] - WARNING:  WPService.MyEngine.onResume()
03-05 14:58:56.559 24653-25296/jPCT-AE: [ 1457186336559 ] - WARNING: creating textures ****************************************************************************
03-05 14:58:56.559 24653-25296/jPCT-AE: [ 1457186336559 ] - WARNING: creating  object
03-05 14:58:56.749 24653-25296/jPCT-AE: [ 1457186336749 ] - WARNING: creating world
03-05 14:58:56.749 24653-25296/jPCT-AE: [ 1457186336749 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:56.749 24653-25296/jPCT-AE: [ 1457186336749 ] - WARNING: No normals have been calculated for this mesh yet!
03-05 14:58:56.750 24653-25296/jPCT-AE: [ 1457186336750 ] - WARNING: -420 0 45.0
03-05 14:58:56.750 24653-25296/jPCT-AE: [ 1457186336750 ] - WARNING: No normals have been calculated for this mesh yet!

2
Support / model flickering sometimes without errors
« on: March 02, 2016, 07:00:44 pm »
hello! I'm writing a livewallpaper based on a GLSurfaceRender example for live wallpapers and jpct I found around. It works pretty well except that sometimes the 3d model flickers and stretches randomly for an instant and then works well again for some time.

What I do is loading a sphere model and apply the rotation matrix coming from the Sensors.Type_vector (sorry I know it's incorrect but I'm at a bar at the moment writing this post on my cellphone). I mean the newer sensor reading type that unifies all sensors to avoid gymbal locks.

So in the main activity I register and listen for sensor changes and remap the axes as I see fit. In the render class, in the onDraw method I just apply the rotation matrix and voilą, works like charm.

Now the issue part, that I hope someone can help me fix.

If I do not apply the rotation in the ondraw method the model remains in its initial position and never ever flickers. If I apply (pseudocode) setrotationmatrix(MainActivity.rotationmatrixFromTheSensors) my model rotates very smoothly as you move the phone but suffers of random flickering/tearing/swap to initial position.
On my opinion its something related to desyncronyzation between MainActivity.onSensorChanged() and RenderEngine.onDraw(). Looks like randomly the ondraw method cannot access correctly the rotationmatrix calculated on the main activity, or may be that sensors sometimes actually fails reading data (my phone is a nexus5 in wonderful shape, so it's unlikely the case).

I've tried to be more thread friendly by let the renderer class implement sensorlistener, but then nothing really worked.

Have someone any clue the cause of this random flicker?

I can provide code, or a video of that behavior if it can help.

Thanks in advance guys :)




P.S. If I do not apply the rotation matrix calculated on the main activity and instead apply dummy rotations in the onDraw() method no fllickers occur. These flickers came out only when I applied the rotation matrix from onSensorChanged with the no-gymbal-lock reading. I'm also persuaded that when I've been using the older geomagnetic and accelerometer readings there were no flickers, but I'm not sure. Got to doublecheck as I manage to get home

3
Support / gles2.0 in GLWallpaperService
« on: October 04, 2013, 06:03:32 pm »
Hi there, I successfully merged jpct-ae samples with GLWallpaperService and have my imported .3ds model rotating happily in my homescreen.
Now I want initialize and switch to opengl es2 and found this documentation http://www.jpct.net/wiki/index.php/OpenGL_ES_2.0_support

so I have to do something like this, somewhere:

Code: [Select]

mGLView = new GLSurfaceView(getApplication());   // don't know were to find mGLView..
mGLView.setEGLContextClientVersion(2);

[...]

frameBuffer = new FrameBuffer(/*gl,*/ w, h);    //existing line, commenting only the first parameter obviously blows up everything


the point is that using GLWallpaperService I cannot find any reference to "mGLView" in order to modify it. I think I looked everywhere stepping in debug and I din't see anything similar, so perhaps this might be a bad approach, or I'm just blindfolded...
Where can I get a hook to the mGLView using live wallpapers? Is this approach correct?

Sounds like GLWallpaperService is not based on GLSurfaceView.

Thanks :D

Pages: [1]