[android-developers] is GLSurfaceView life-cycle the same as Activity that own it ?
what puzzle me so much is that i can't destroy a GLSurfaceView while i don't want to exit the activity. the fact is when i destroy a GLSurfaceView which had show in the screen (that means it has binded to the activity's SurfaceHolder), the activity exits without any prompting. Perhaps ,the Context which provided in the Construction of GLSurfaceView joins the two things together. so my conclusion is that a GLSurfaceView can only be destroyed when exit the activity. is there anyway to destroy a GLSurfaceView without exit activity? is there someone can provide a clue? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: is GLSurfaceView life-cycle the same as Activity that own it ?
i'v found one solution, the key point is that if you destroy GLSurfaceView before it stops running,it will raise errors(not responsible) i have used to destroy the GLSurfaceView immediately followed by GLSurfaceView.onPause , the GLSurfaceView hasn't stoped runnnig at that time ,and not destroyed the EGL enviroment(something like EGLSurface,EGLContext...and so on). so i use postDelayed to do that things about 50 millisecond later. it works well! but that seems not a very good approach for me ,because 50 millisecond is just a probably estimation. maybe 30 or 20 could also work . On 12月3日, 上午10时17分, LemonDev lem...@gmail.com wrote: what puzzle me so much is that i can't destroy a GLSurfaceView while i don't want to exit the activity. the fact is when i destroy a GLSurfaceView which had show in the screen (that means it has binded to the activity's SurfaceHolder), the activity exits without any prompting. Perhaps ,the Context which provided in the Construction of GLSurfaceView joins the two things together. so my conclusion is that a GLSurfaceView can only be destroyed when exit the activity. is there anyway to destroy a GLSurfaceView without exit activity? is there someone can provide a clue? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] GLSurfaceView not responsible when removed from WindowManager
my GLSurfaceView is added by WindowManager.addView,aims to do some animation ,but when it finishs the animation, i remove it by WindowManager.removeView , it is freezed,and the logcat prints a log: SurfaceComposerClient : lock_layer timed out (is the CPU pagged ). i have called the GLSurfaceView.onPause before remove it. But it also is not responsible. what is the problem? any help appreciated ! -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Slow OpenGL on Samsung Galaxy - solution
i guess your Samsung Galaxy using the cell of Qualcomm 7201A(or nearly), it comes into a conclusion that a version of libhgl.so that qualcomm provided are not correctly returned when call eglChooseConfig . i have encounted that problem as you. so just setup your own EGLConfigChooser ,and don't set the EGL10.EGL_STENCIL_SIZE which would lead to wrong results. good lucky! On 11月7日, 下午9时47分, Dmitry.Skiba dmitry.sk...@gmail.com wrote: It makes sense when you generalized it like that, but in this particular case the application gets put in software mode for asking for *less* capabilities. If it claims it needs a depth buffer when it doesn't, only then does it get the hardware acceleration. Exactly. Unfortunately I don't have Samsung Galaxy, so I don't know what configs are reported when only depth size of 16 is requested. Can someone please check it out? Maybe it will shed some light on the problem. BTW, here guys found that copying libhgl.so from G1 fixes the issue:http://androidforums.com/samsung-i7500/14611-opengl-working-galaxy-ii... Dmitry On 7 ноя, 06:02, Lance Nanek lna...@gmail.com wrote: if you ask for something that it doesn't support, the system will gracefully fallback to the software On Nov 6, 8:29 am, David Turner di...@android.com wrote: On Fri, Nov 6, 2009 at 1:00 AM, Dmitry.Skiba dmitry.sk...@gmail.com wrote: If yourOpenGLgame is running badly on Samsung Galaxy, you can try solution that we have found here: http://www.anddev.org/samsung_galaxy_odd_ogl_es_hardware_acceleration... In short, you need to setup your own EGLConfigChooser and choose depth size of 16. This is what we found. It seems that otherwise all rendering is done through softwareOpenGL. Now question to google guys: why is that? Because the GPU has limited capabilities, and if you ask for something that it doesn't support, the system will gracefully fallback to the software implementation ? Choosing the best configuration based on the hardware capabilities is quite a standard topic inOpenGLland. -- 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+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Does OpenGL API glDeleteTextures works?
Texture index of zero is default,you can not delete it. you should always delete textures that you generate by call glGenTexures. On 11月19日, 下午4时57分, BigOne smile2...@gmail.com wrote: Hi all I'm doing a little 3D app programming based on SDK 1.5. I can't change textures in any way with glDeleteTextures. Please help to check if I did sth. wrong. My subfunction is as below: public void doSomething() { mGL.glBindTexture(GL10.GL_TEXTURE_2D, 0); mGL.glDeleteTextures(1, textures, 0); mGL.glGenTextures(1, textures, 0); mGL.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]); InputStream is = mContext.getResources() .openRawResource(R.drawable.robot); Bitmap bitmap; try { bitmap = BitmapFactory.decodeStream(is); } finally { try { is.close(); } catch(IOException e) { // Ignore. } } GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); bitmap.recycle(); } -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Screen is dark momentarily when launching OpenGL view (GLSurfaceView)
set a background bitmap before you rendering opengl , and as soon as to to render the second frame ,you can move background away! the key point is to set the background bitmap to the same appearance of first activity( i think in your situation is your first homescreen ). this is my solution i implements on my application. good luck! On 11月10日, 上午11时06分, Luke vagrant...@gmail.com wrote: Dear all. i found a key point, when i execute the clear color and depth buffer only in StaticTriangleRenderer. (glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)) it will make the screen flicker. would you please provide your experience about this issue? thanks a lot. Luke On 11月3日, 上午2時16分, Luke vagrant...@gmail.com wrote: Dear all, I want to implement the transition effect ( transparent with Z axis ) when user slip the android home to change home page. therefore, I plan to launch the new activity that is implemented by OpenGLES to perform this effect. However, i encounter a problem that the screen/display is dark momentarily when launching theOpenGLES activity. would you please share your experience about this issue? thanks a lot. BTW, here is my implement procedure for your reference. 1. Create a new activity and new a GLSurfaceView. 2. Set the theme parameter in AndroidManifest.xml to make a transparent background for activity (android:theme=@android:style/ Theme.Translucent) 3. Make transparent background for GLSurfaceView (refer the API demo source - setEGLConfigChooser) 4. Implement the setRenderer function for GLSurfaceView. 5. in render calss, I just refer the StaticTriangleRenderer.java of API demo to add a texture on triangle and rotate. Any help would be appreciated. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to remove statusbar animation when chang to fullscreen.
when i chage my activity to fulscreen, the statusbar performs an animation,but not disappear immediately. so how can i make the statusbar disappear immediate ? if need to change framework , where is it? i have read the statusbarservice.java, statusbarview.java, statusbarpolicy.java and statusbarmanager.java ,but still have no idea ! -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: what about the Android 3d module file type .gles
thanks,but where can we learn from about it? On 11月1日, 下午1时02分, Fred Grott(Android Expert) fred.gr...@gmail.com wrote: its a graphical layout engine script file, hence the name On Oct 31, 2:08 am,LemonDevlem...@gmail.com wrote: GlobalTime use this file type ,but i have found nothing about it in the Android documents .and also no discussions on the internet . so , how can we export a gles file type from others like 3DMax... -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] what about the Android 3d module file type .gles
GlobalTime use this file type ,but i have found nothing about it in the Android documents .and also no discussions on the internet . so , how can we export a gles file type from others like 3DMax... -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] GLSurfaceView show initially with black background before rendering first frame?
when i create a GLSurfaceView to render a textured cube, and i add this new glsurfaceview to my FrameLayout to do some animation , it first shows a black background, and then my cube begin to rotate. so is there any method to avoid the matter? otherwise , it seems terriable to be an animation. --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] what does SURFACE_TYPE_HARDWARE really mean?
In android's documents: Surface type: creates a suited to be used with DMA engines and hardware accelerators. does it mean that if i don't have hardware accelerator, this parameter has no effects? or if i want to accelerate my opengles application ,then i should use this parameter? anyone help, thanks. --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to use hardware acceleration in OpenGL ES
i draw a cube with two sides textured(320*430 png) and let it rotate between the two sides, but it's sad to get a 16 FPS on emulator and 9 FPS on the real phone. i don't known whether i have used the hardware acceleration on my phone. so i tried many parameters in OpenGLES ,finally i found i can set a value in my CubeView(inherit from GLSurfaceView )'s constructor , public CubeView(Context context) { super(context); this.getHolder().setType(SurfaceHolder.SURFACE_TYPE_HARDWARE); // here is the crucial line mRender = new CubeRender(this); this.setRenderer(mRender); } setType with the value SURFACE_TYPE_HARDWARE can improve the OpenGL rendering speed, and i get a rate of 14FPS on real phone, but has no effect on emulator( i guess emulator didn't use hardware to render) but the 14FPS also is not enough for me , 18 -- 20 may be acceptable . the qualcomm demo neocore can render a complex arena on 25-27 FPS in my phone. so what's the problem with me, is there another ways to use the hardware acceleration in OpenGL ES . my phone has a cell of qualcomm MSM7201A with a hardware acceleration. --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] there are only five animations for android? how can i extend this feature
as we known we can use predefined animations in android developing, they are : alpha animation, scale animation, rotate animation, translate animation and skew animation(extend animation using Matrix's setSkew function). though ,we can implement other effect using the Matrix, but it can only realize some shape transformations(i think the real color pixels don't changed). If i want to make some effects like blur , it can't work,because animation only give the transformation matrix . we can't not manipulate the color pixels. Please do me a favor, how can i realize effect like blur ? --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: there are only five animations for android? how can i extend this feature
thanks. you mean i can't use the Animation object anymore, and i should do the blur in my code . but the problem is i don't use the blur separately: i want to mix the blur , scale and alpha , so i need to code the scale and alpha myself ? the android use Skia to draw bitmap, so weather i can modify the framework to invoke a blurfilter in skia? it seems a big workload, any advice is appreciated ! On 9月2日, 上午10时29分, Dianne Hackborn hack...@android.com wrote: You'll need to take a snapshot of the thing you are blurring, perform a blur operation on that bitmap (which you will need to write yourself), and then you can draw the bitmap. On Tue, Sep 1, 2009 at 7:14 PM, LemonDev lem...@gmail.com wrote: as we known we can use predefined animations in android developing, they are : alpha animation, scale animation, rotate animation, translate animation and skew animation(extend animation using Matrix's setSkew function). though ,we can implement other effect using the Matrix, but it can only realize some shape transformations(i think the real color pixels don't changed). If i want to make some effects like blur , it can't work,because animation only give the transformation matrix . we can't not manipulate the color pixels. Please do me a favor, how can i realize effect like blur ? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] can i dynamic cre ate a third part view in my activity?
dear: can i embed a user created view( like Button ) into my activity from another apk dynamic. as like developing in VC++ , i can dynamic create and embed a third part component in my application. does it works in android application ? --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] cannot debug Launcher
this is a strange problem puzzled me so much . when i remove Launcher.apk from System.img and add another Home.apk into it , i just want to debug the Launcher . when i start to debug within eclipse,it can breakout ,but can not go to the source code and a .class file showed instand, it said source code cannot find .so what makes it happen ? --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---